-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test "server ready" feature in integrated terminal #71074
Comments
Unable to test this with express-app-sample... |
Was able to test this with a regular server: const http = require('http');
const port = 3001;
const app = http.createServer((req, res) => {
res.write('Hello world!');
res.end();
});
app.listen(port);
console.log(`server listening at port ${port}`); With the pattern: "pattern": "server listening at port ([0-9]+)", Even cooler, after installing the Debugger for Chrome, I tested this one, which opens Chrome on start and breaks on that client side breakpoint. const http = require('http');
const port = 3001;
const app = http.createServer((req, res) => {
res.write(`<script>debugger;</script>`);
res.end();
});
app.listen(port);
console.log(`server listening at port ${port}`); |
The default app generated by the express generator has changed and does not spit out the This can be easily fixed:
function onListening() {
var addr = server.address();
var bind = typeof addr === 'string'
? 'pipe ' + addr
: 'port ' + addr.port;
debug('Listening on ' + bind);
console.log('listening on ' + bind);
} |
I understand |
I'm already looking into this issue on Windows.... |
I'm not able to reproduce node.js debugging issues on Windows. |
let debug on my machine then |
This seems very flaky (and silent to me). I need a couple of restarts of my VM for debugging to work reliably. Opening firefox only worked after the 5th try, it was likely installing an update, but I had no clue what's going on |
Validated all steps using my https://github.com/auchenberg/nodejs-shopping-cart on MacOS with no problems. I agree with #69311 and #71177, it would be great to have a some logging that also outputs if the |
It will be difficult to log if the pattern doesn't match anything. |
It's more in the configuration phase, where you don't know whether your regex is working or not, but you could argue that's a generel regex problem ;) |
Test for #69898:
Complexity: 3
For a description of the feature, please see #69311 (comment).
In this milestone we've added support for detecting the trigger message in the integrated terminal (in addition to the debug console supported last milestone).
And we improved the error message if the "Debugger for Chrome" is not installed if a user configures the "server ready" feature to start a browser debug session.
Verify that....
openExternally
anddebugWithChrome
actions (see https://code.visualstudio.com/docs/nodejs/nodejs-tutorial#_an-express-application for how to create an express app)The text was updated successfully, but these errors were encountered: