Skip to content
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

Breakpoints Line Number State is Lost #68265

Closed
interpegasus opened this issue Feb 8, 2019 · 6 comments
Closed

Breakpoints Line Number State is Lost #68265

interpegasus opened this issue Feb 8, 2019 · 6 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@interpegasus
Copy link

  • VSCode Version:Version 1.31.0 (1.31.0)
  • OS Version: 10.14.2 (18C54)

Steps to Reproduce:

  1. Create a Node.js project
  2. Create some breakpoints.
  3. Launch the Visual Studio Code built-in debugger

Result
Some breakpoints are erased, and some others change line number.
Usually one breakpoint is automatically added in the first lines of the file.
Breakpoints have to be recreated.

Expected behavior
The app should remember the line numbers, and status of each break point.

Does this issue occur when all extensions are disabled?
Yes

VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* code --disable-extensions

@interpegasus
Copy link
Author

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "runtimeExecutable": "nodemon",
            "restart": true,
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen",
            "name": "Launch Debugger",
            "program": "${workspaceRoot}/bin/www"
        },
        {
            "type": "node",
            "request": "attach",
            "name": "Attach to Port",
            "address": "localhost",
            "port": 5858
        },
    ]
}

@roblourens
Copy link
Member

Can your project be shared? If not can you set "trace": true in your launch config, try this again, then upload the log from the path it writes to the debug console?

@roblourens roblourens added the info-needed Issue requires more information from poster label Feb 11, 2019
@interpegasus
Copy link
Author

I have created a sample project without sensitive data. For debugging the breakpoint issue on Visual Studio. Thank you! :
https://github.com/interpegasus/BreakPointDebug

@roblourens
Copy link
Member

I can't run this, it looks like it's expecting a mongo server or something, how can I run it without that?

/Users/roblou/Documents/BreakPointDebug/node_modules/mongo-express/node_modules/mongodb/lib/server.js:265
        process.nextTick(function() { throw err; })
                                      ^
MongoError: failed to connect to server [127.0.0.1:27017] on first connect
    at Pool.<anonymous> (/Users/roblou/Documents/BreakPointDebug/node_modules/mongo-express/node_modules/mongodb-core/lib/topologies/server.js:326:35)
    at emitOne (events.js:116:13)
    at Pool.emit (events.js:211:7)
    at Connection.<anonymous> (/Users/roblou/Documents/BreakPointDebug/node_modules/mongo-express/node_modules/mongodb-core/lib/connection/pool.js:270:12)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at Connection.emit (events.js:214:7)
    at Socket.<anonymous> (/Users/roblou/Documents/BreakPointDebug/node_modules/mongo-express/node_modules/mongodb-core/lib/connection/connection.js:175:49)

@interpegasus
Copy link
Author

interpegasus commented Feb 21, 2019

Good morning,

The project has been updated and the dependency has been removed. https://github.com/interpegasus/BreakPointDebug

The issue can be tested by adding breakpoints inapp.js. After starting/restarting the debugger, the breakpoints are rearranged .

Please let me know in case you have any other questions. Thank you!

@roblourens
Copy link
Member

Thanks. You just have to add two lines to your launch config:

"disableOptimisticBPs": true for this issue: facebook/create-react-app#6044 because app.js is the name of the script in the runtime and also the sourcemapped source name.

And "smartStep": false for this issue: #68127

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants