Comments (19)
Can you setup a simplified project to reproduce the error and create a repo at github? I d like to inspect this.
Never Seen this before. Looks like a crash in chromium.
from iron-node.
Are you spawning processes there? Maybe there are more infos in your terminal console log.
from iron-node.
I created a small example: https://gist.github.com/mik01aj/873aa20f73716f626738
from iron-node.
Thanks. You are running iron-node suite.js
right? I will test this this evening
from iron-node.
Yes.
from iron-node.
OK.
I was able to run the test suite.
And I was able to debug the test suite.
Jasmine calls process.exit
which seems to cause a crash.
This hot fixes the issue.
process.exit = function() {}
Well this should impact other Libraries too so I need to overwrite process.exit
and output exitcode to console.
from iron-node.
Can you confirm that ? I updated your gist at https://gist.github.com/s-a/aaec29ad03cd7138ca8a#file-suite-js-L10
from iron-node.
Regarding the strange console log I created a ticket at electron/electron#2390.
We should change the issue title because there is nothing you can debug there 😸
from iron-node.
In case of a script calls process.exit()
you will see now a toaster as notification. This is much more fun 😃
from iron-node.
Nice!
I have one more idea: maybe system.exit
should be mocked with function () { debugger; }
?
from iron-node.
I think that's something users should decide for themselves. For some people it could be irritating. You can create packages very easy to implement your desired behavior.
An example package is here
https://github.com/s-a/iron-node-zerodarkmatrix-theme/blob/master/index.js. I would love to See various mutations of addons at the package channel.
from iron-node.
How about this example?
setTimeout(function () { process.exit(); }, 1000);
setTimeout(function () { console.log('You will never know what I wanted to tell you'); }, 1001);
Will the message show up in iron-node
? I think it will, and imho it shouldn't.
from iron-node.
Yes it is a little bit weird. Would be nice to find a way to stop script execution if exit was called which is far from trivial. Seems you found a limitation here.
from iron-node.
When you put a breakpoint there, it becomes trivial :) And you can put the real process.exit
after it so that these strange situations will not happen.
A breakpoint at exit is very useful imho, because then I am able to inspect whole application state at exit. Think about a command/line script. It can have process.exit()
on the end or not, it's roughly equivalent (minus waiting for any pending calls from setTimeout
, setInterval
, process.nextTick
, Promise
s or similar async mechanisms). I think that they should be "roughly equivalent" in the debugger as well, so that in both these cases (I mean a. scripts exititing explicitly using proces.exit
and b. scripts exiting implicitly by finishing executing the main script and emptying the event loop):
- the process behaves the same both in normal runtime and in debugger
- it is easy to debug post-mortem state of the process.
from iron-node.
We can not avoid the situation. process.exit will cause a crash because everything is based on node. Anything beyond process.exit will exit the GUI application.
So far there is no way to detect script finished especially pending async methods done events.
from iron-node.
@mik01aj check out https://github.com/s-a/iron-node-process-exit-break
from iron-node.
It works great! Thanks! :)
from iron-node.
I owe you a beer when I come to Hamburg!
from iron-node.
👍 😄
from iron-node.
Related Issues (20)
- fails to stop on `debugger;` command HOT 4
- A dynamic link library (DLL) initialization routine failed (bcrypt) HOT 2
- iron-node not working with angular2-seed (typescript, gulp) HOT 1
- iron-node > 2.2.15 makes unicorns cry => doesn't work on OSX HOT 4
- Application takes 100% CPU and is unresponsive HOT 4
- Problem with using node-sass on Ubuntu 16.04 HOT 1
- command + w closes iron-node even when iron-node is behind another window HOT 1
- How to pass command to nodejs? HOT 1
- All good things come to an end.. HOT 4
- Publish a new version HOT 2
- new installation requieres install -g and still can't start HOT 7
- Run this in the web browser HOT 1
- No such module: atom_renderer_v8_util HOT 7
- Electron failed to install correctly, please delete node_modules/electron and try installing again HOT 5
- [feature request] Debugging without writing debugger HOT 4
- Electron Helper crashes when refreshing while devtools is paused HOT 4
- contextify.node was compiled against a different Node.js version using NODE_MODULE_VERSION 48 HOT 1
- Error: Cannot find module, despite NODE_PATH being set
- Usage with babel-node HOT 1
- Child Processes don't show in the logs or in the source
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 iron-node.