Обсуждение: [pgAdmin4[Patch][Webpacking]: Enable source maps in pgAdmin4 for development environment
[pgAdmin4[Patch][Webpacking]: Enable source maps in pgAdmin4 for development environment
Hi All,
This patch enables source maps in pgAdmin4 for development environment.
On running yarn run bundle It will create source maps(i.e. extract each module js file so that it is available to debug).
You can search each module(ie. menu.js to debug) file by filename as follows:
Start pgAdmin4 server or run separately
yarn run bundleinpgadmin/webOpen pgAdmin4 in browser(I am using chrome). Click
sourcespanel and pressCMD+Pand search for filemenu.js. Click and then add breakpoint to the line where you want to debug codebase. Screenshot attached for reference.
I have excluded vendor and codemirror bundle from source map as i believe we don’t debug these files. If someone needs, they can remove vendor.js from source map plugin and rebuild.
I didn’t add this for production mode yet.
Reference to SourceMapDevToolPlugin
Please find attached patch and review.
Thanks,
Surinder
Вложения
Hi All,
This patch enables source maps in pgAdmin4 for development environment.
On running
yarn run bundleIt will create source maps(i.e. extract each module js file so that it is available to debug).You can search each module(ie.
menu.jsto debug) file by filename as follows:
Start pgAdmin4 server or run separately
yarn run bundleinpgadmin/webOpen pgAdmin4 in browser(I am using chrome). Click
sourcespanel and pressCMD+Pand search for filemenu.js. Click and then add breakpoint to the line where you want to debug codebase. Screenshot attached for reference.I have excluded
vendorandcodemirrorbundle from source map as i believe we don’t debug these files. If someone needs, they can removevendor.jsfrom source map plugin and rebuild.I didn’t add this for production mode yet.
Reference to SourceMapDevToolPlugin
Please find attached patch and review.
Thanks,
Surinder
Hi Surinder,This is great and useful. Looks good to me. Hope this can be committed ASAP.
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Thanks,Wenlin & VioletOn Wed, Aug 2, 2017 at 9:41 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote: Hi All,
This patch enables source maps in pgAdmin4 for development environment.
On running
yarn run bundleIt will create source maps(i.e. extract each module js file so that it is available to debug).You can search each module(ie.
menu.jsto debug) file by filename as follows:
Start pgAdmin4 server or run separately
yarn run bundleinpgadmin/webOpen pgAdmin4 in browser(I am using chrome). Click
sourcespanel and pressCMD+Pand search for filemenu.js. Click and then add breakpoint to the line where you want to debug codebase. Screenshot attached for reference.I have excluded
vendorandcodemirrorbundle from source map as i believe we don’t debug these files. If someone needs, they can removevendor.jsfrom source map plugin and rebuild.I didn’t add this for production mode yet.
Reference to SourceMapDevToolPlugin
Please find attached patch and review.
Thanks,
Surinder