Nx: Not able to attach the vs code debugger to application in nx workspace, but debugger work fine with libraries.

Created on 8 Sep 2019  路  5Comments  路  Source: nrwl/nx

_Please make sure you have read the submission guidelines before posting an issue_

Prerequisites

Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.

  • [ ] I am running the latest version
  • [x ] I checked the documentation and found no answer
  • [x] I checked to make sure that this issue has not already been filed
  • [ x] I'm reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

Should be able to attach .ts file from application project in nx workspace to vs code debugger.

Current Behavior

I have a nx workspace with application project and libraries , i'm able to attached the vs code debugger to libraries but it does not get attached to application project related ts files.

i thought it is a issue with the location of .vscode launch.json. but it is place correctly in the root folder of the application.

Failure Information (for bugs)

when break point is set within the application related ts file , vs code display it as unverified breakpoint.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. create the nx workspace based project with nx version @8.1.2
  2. added the one application and one library in nx workspace
  3. Go to vs code debugger add new configuration , it will create the vs code in the root folder
  4. change the url in the launch.json to http://localhost:4200
  5. execute the ng serve -o
    6 . launch the debugger.
  6. set the break point in any ts file in library
  7. set the break point in app component ts file in application (i.e @ this point vs code will set the break point as unverified breakpoint )

Context

I know you may think this is visual studio code related concern, since nrwl have create the nx workspace template , you would have debugged the application and library code while testing. Hence post this issue to your forum. Any suggestion or help will be very much appreciated.

  • nx @8.1.2
  • vs code @ 1.38.0
misc bug

Most helpful comment

Is there any update on this issue? I am having the same problem.

All 5 comments

Same problem here.

Same here!

Is there any update on this issue? I am having the same problem.

Hi, sorry about this.

This was mislabeled as stale. We are testing ways to mark _not reproducible_ issues as stale so that we can focus on actionable items but our initial experiment was too broad and unintentionally labeled this issue as stale.

I worked through the nx tutorial today, starting completely from scratch. I can confirm that you can't attach breakpoints in Chrome in VS Code in an Angular app. If I create a simple lib and put a component in it, I can successfully set a breakpoint there.

I have a similar experience with another large nx workspace with lots of libraries. The breakpoints work fine in my libs but not in the main app.

This should be a simple case, but is likely to put newbies off.

Was this page helpful?
0 / 5 - 0 ratings