USB debug with sources / breakpoints
ephraimt last edited by
According to the Monaca site, it is possible to put breakpoints in source code when debugging on a device via USB.
How is this done?
Monaca does not generate source maps so there is no way to step through the original source.
Please don’t answer with “check the Chrome Dev Tools documentation”.
I know how to inspect the device in Dev Tools. The problem is that all I can see is the transpiled app bundle, not the original source.
@ephraimt I found an issue in the webpack dev configuration. We are currently using
eval-source-mapto generate the source map, but it seems that it’s bugged (breakpoints can be added but the execution does not stop). Check the following issue in the official Webpack repository.
To fix it and to be able to debug, open your
/projectName/webpack.dev.config.jsfile and change
It will fix the issue (I made the screenshot with a Vue template, but React templates work as well):