Comments (8)
It's also worth mentioning that debugger
statements aren't working as expected until the app is fully launched, leading me to think that the source is executed before the debugger is attached.
from devtool.
Must have missed this during my first read-through of the readme:
When the DevTools window first opens, you may need to reload the browser for source maps and debugging to work correctly (related: electron#2379)
from devtool.
most debug tools can add breakpoints to sum.js first, then I can select this file run as debug mode, so in this way I can debug the code easy.
Electron doesn't (yet) provide a way to inject break points like this.
Right now you will need to run the DevTool, set a break point, and then reload (Cmd + R or Ctrl + R) before the debugger and source maps work nicely.
It's also worth mentioning that debugger statements aren't working as expected until the app is fully launched, leading me to think that the source is executed before the debugger is attached.
@s-a Did you also have this issue in iron-node
? If so how did you get around it?
from devtool.
In ironNode I am waiting for DevTools opened event. After that I launch a debug session.
https://github.com/s-a/iron-node/blob/54fd8aa1cfb01d970ffd6d625cf81247b4f7510c/app/index.js#L100
from devtool.
Thanks @s-a – it seems obvious now. 😄
@CMTegner Your issue should be fixed in 1.3.1; you no longer need to reload the page for debugger
statement or source maps to work.
EDIT: It looks like sometimes it still isn't getting caught. Investigating...
from devtool.
Just gave 1.3.1 a quick test, and during my – very limited – testing debugger
statements seem to be working as expected. Great work @mattdesl!
from devtool.
I just fixed up the previous commit so it is a bit more robust – the debugger should now be active by the time the app loads.
I also added a --break
option to the CLI in 1.4.0
which injects a hidden debugger statement into the first line of your entry file, allowing it to "break on first run" like with node-inspector
. This is particularly useful if you need to debug something that you can't just reload (i.e. the script depends on process.stdin
which is only sent once).
Hopefully this issue is all cleared up, now. 😄
from devtool.
yep~ sounds very nice! thanks a lot~~ 😄 👍
from devtool.
Related Issues (20)
- Module version mismatch. Expected 50, got 51. HOT 5
- Fails on save when using mongoose 4.x with sub-documents
- Require hook for ts-node doesn't work HOT 3
- V8 flag `--expose-gc` causes whole config to silently fail
- Reload console on file change with --watch
- Windows 10: File /npm/node_modules/devtool/index.html not found HOT 1
- Add flag to disable process.exit() HOT 1
- impossible to inspect http requests
- Devtool Chrome debugger cannot find prototype closure functions
- Ignore files when using --watch HOT 5
- Devtools doesn't work with dynamic link libraries
- REPL :: On windows (10) i can't require modules from current working directory HOT 1
- Can you add docs on how to use this with jest? HOT 1
- Support more flags in devtoolrc
- install error HOT 1
- add support async/await HOT 3
- please update new electron version
- Unable to install
- devtool with expressjs, how to find script files?
- devtool/bin/spawn replacement in Node/DevTool? Looking for advice ... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devtool.