question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Use VS Code Debugging in CLI project, i.e. use F5 to launch project, and debug in VS Code?

See original GitHub issue

Please provide us with the following information:

OS?

Windows 10.

Versions.

Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here: @angular/cli: 1.0.0-rc.0 node: 7.6.0 os: win32 x64 @angular/common: 2.4.8 @angular/compiler: 2.4.8 @angular/core: 2.4.8 @angular/forms: 2.4.8 @angular/http: 2.4.8 @angular/platform-browser: 2.4.8 @angular/platform-browser-dynamic: 2.4.8 @angular/router: 3.4.8 @angular/cli: 1.0.0-rc.0 @angular/compiler-cli: 2.4.8

Repro steps.

Was this an app that wasn’t created using the CLI? What change did you do on your code? etc. Trying to use F5 to launch CLI project in VS Code.

The log given by the failure.

Normally this include a stack trace and some more information. NA

Mention any other details that might be useful.

I am trying to find a supported way to enable debugging a CLI project in VS Code by launching the application using F5.


Thanks! We’ll be in touch soon.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
Mayjestcommented, Mar 2, 2017

I’ve been able to debug in VSCode using the Debugger for Chrome extension, and a launch config similar to this:

 {
            "name": "Launch Client",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:4200/#",
            "port": 9223,
            "sourceMaps": true,
            "diagnosticLogging": true,
            "webRoot": "${workspaceRoot}",
            "runtimeArgs": [
                "--disable-session-crashed-bubble",
                "--disable-infobars"
            ],
            "userDataDir": "${workspaceRoot}/.vscode/chrome"
        }

It doesn’t actually start the app inside VSCode, but if you start it outside (ng serve) then you can hit F5 to launch the debugger part.

3reactions
hanslcommented, Mar 4, 2017

Closing as fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging in Visual Studio Code
To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and...
Read more >
Debug Browser Apps using Visual Studio Code
The simplest way to debug a webpage is through the Debug: Open Link command found in the Command Palette (Ctrl+Shift+P). When you run...
Read more >
Introduction to Debugging in Visual Studio Code
In this tutorial, we will show you how to run and debug a program in VS Code. We'll take a tour of the...
Read more >
Debugger Extension - Visual Studio Code
Learn how to provide debugger extensions (plug-ins) for Visual Studio Code ... mock test project with the readme.md file, start a debug session...
Read more >
Run and Debug Java in Visual Studio Code
Pressing F5, the debugger will automatically find the entry point of your project and start debugging. You can also start a debugging session...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found