Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Issues with Setting Debug Breakpoints via F9 #71

Closed
sgtoj opened this issue Jan 2, 2017 · 4 comments
Closed

Issues with Setting Debug Breakpoints via F9 #71

sgtoj opened this issue Jan 2, 2017 · 4 comments

Comments

@sgtoj
Copy link

sgtoj commented Jan 2, 2017

Version 1.9.0-insider
Commit f2379e882b415e2c503a723776c4431a40d7c1aa
Date 2017-01-02T07:11:43.247Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

Steps to Reproduce:
  • Create a JS and/or TS (with source mapping)
  • Set debug point on couple random lines using the F9 key.
  • Enter debug mode.
    • Normally, the breakpoints will randomly move around.
  • Set more debug point on other lines.
    • Normally, the setting a new breakpoint affects the other existing points.
Issues
  • Breakpoint set via F9 key randomly move once debug is executed.
    • Normally, but not always, it will move down a line.
    • Somes times, breakpoints are removed altogether.
  • While debug mode is active, VS Code or Node-Debug doesn't respect the line number a new breakpoint (via F9) was set.
  • While debug mode is active, existing breakpoints will randomly move around when another breakpoint (via F9) is added.

Breakpoints Set via F9 - Better quality
breakpoints set via F9

Breakpoints Set via Mouse Clicking on the Sidebar (set on the same lines above)
breakpoint server via clicking

Troubleshooting
  • Affects multiple systems and OS (Windows 10 Insiders and Ubuntu 16.10)
  • Affects multiple Node versions: v6.9.2 and v7.3.0
  • Seems to only affect breakpoints set via F9 key.
  • Seems affect only VS Code Insiders
  • Enabling or Disabling SmartStep doesn't change the outcome.
    • Module in the GIFs are written in TS before compiled.
launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch - Test Script",
            "type": "node2",
            "request": "launch",
            "program": "${workspaceRoot}/scripts/test.js",
            "cwd": "${workspaceRoot}",
            "outFiles": [],
            "stopOnEntry": false,
            "sourceMaps": true,
            "smartStep": true
        }
    ]
}

Also posted issue at microsoft/vscode#18015.

@sgtoj sgtoj changed the title Issues with Debug Breakpoint via F9 Issues with Setting Debug Breakpoints via F9 Jan 2, 2017
@roblourens
Copy link
Member

Good analysis - we just made a change so that when a bp is set with F9, it will be set at the column of the cursor, not at column 0 as when setting by clicking in the margin. I'll investigate, maybe I need to make a change.

In your example, are you using sourcemaps?

@sgtoj
Copy link
Author

sgtoj commented Jan 2, 2017

@roblourens Yes. I updated the original post with more information including link to my repo and launch.json. Below is the tsconfig.json`.

tsconfig.json
{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es2016",
        "noLib": false,
        "declaration": true,
        "declarationDir": "declaration",
        "allowJs": false,
        "pretty": true,
        "watch": false,
        "sourceMap": true,
        "strictNullChecks": true,
        "outDir": "app",
        "traceResolution": false,
        "alwaysStrict": true
    },
    "exclude": [
        "declaration/",
        "node_modules/",
        "app/",
        "scripts/",
        "test/",
        "tmp/",
        "**/*.js"
    ]
}

@roblourens
Copy link
Member

I realized that there's an issue with this and left a comment in the vscode bug.

@roblourens
Copy link
Member

We reverted the change that caused this, so it should be fixed now. Will be revisiting breakpoints on columns in a month or two.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants