Skip to content

"Break on uncaught exceptions" breaks in module_job instead of my code #122246

Closed

Description

Issue Type: Bug

Hello! I'm writing a node.js program. When I tick the "Breakpoints: Uncaught exceptions" box and run my program, VSCode opens a file named "module_job", which I didn't write and am not familiar with, and puts a breakpoint there. I would much prefer that VSCode put a breakpoint at the place in my code that caused the error. Can you help?

VS Code version: Code 1.55.2 (3c4e3df, 2021-04-13T09:36:32.643Z)
OS version: Darwin x64 20.3.0

System Info
Item Value
CPUs Apple M1 (8 x 2400)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.10GB free)
Process Argv --crash-reporter-id 7da1ab90-b9cb-48ef-898b-630929f68b9d
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
tasks-statusbar hed 0.1.0
remote-containers ms- 0.166.1
remote-ssh ms- 0.65.4
remote-ssh-edit ms- 0.65.4
color-highlight nau 2.3.0
LiveServer rit 5.6.1
vscode-todo-highlight way 1.0.4

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602cf:30291500
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30276681
vstes627:30244334
pythonvsnew554cf:30291488
pythontb:30283811
vspre833:30267464
pythonptprofiler:30281270
vshan820cf:30276953
pythondataviewer:30285071
vscus158cf:30286554

Activity

  1. toasty-sunbeam commented on Apr 26, 2021

    @toasty-sunbeam
    Author

    Here's the Call Stack pane:

    image

    My program has very few dependencies - just svg.js, svgdom, and xml-js (plus light-server, but I'm not using that right now). I'm running it with node .. Here's my package.json:

    {
      "dependencies": {
        "@svgdotjs/svg.js": "^3.0.16",
        "light-server": "^2.9.1",
        "svgdom": "^0.1.8",
        "xml-js": "^1.6.11"
      },
      "scripts": {
        "generate": "node .",
        "dev": "light-server -s . -p 8080 -w '*.js, *.html # npm run generate'"
      },
      "type": "module"
    }

    Here's the error:

    image

  2. toasty-sunbeam commented on Apr 26, 2021

    @toasty-sunbeam
    Author

    Here's something weird. If I try to debug by clicking the "Launch program" button in the Debugger pane, MacOS's "Save as" dialog comes up, asking where I want to save a copy of module_job to my filesystem. I don't know why it thinks I would want to do that.

    Here's a copy of my launch.json, in case that helps.

    {
    	"version": "0.2.0",
    	"configurations": [
    		{
    			"type": "node",
    			"request": "launch",
    			"name": "Launch Program",
    			"skipFiles": [
    				"<node_internals>/**"
    			],
    			"program": "./index.js"
    		}
    	]
    }
  3. added
    debug
    on Apr 27, 2021
  4. added
    *as-designed
    on Apr 27, 2021
  5. removed
    *as-designed
    on Apr 27, 2021
  6. connor4312 commented on Apr 27, 2021

    @connor4312
    Member

    Thanks for the issue, this looks like a bug in Node.js. Please follow nodejs/node#38439 for updates.

  7. added
    upstream
    upstream-issue-linked
    on Apr 27, 2021
  8. toasty-sunbeam commented on Apr 27, 2021

    @toasty-sunbeam
    Author

    I'll watch that issue for updates. Thank you so much! 🙇

  9. locked and limited conversation to collaborators on Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugupstreamupstream-issue-linked

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions