microsoft / vscode-chrome-debug-core

A library for implementing VS Code debug adapters for targets that implement the Chrome Debugging Protocol.
Other
157 stars 119 forks source link

Is it possible to move location of ClientApp folder (or even change it's name)? #522

Open johnpankowicz opened 5 years ago

johnpankowicz commented 5 years ago

I submitted this issue first as an AspNetCore issue. But I was told that I should submit it here instead.

I want to move the ClientApp folder up one level, so that it is not inside of the .Net folder structure. (many reasons for this). But if I do I can no longer set breakpoints in the ClientApp from within Visual Studio (2019). In fact, this happens even if I just change the name of "ClientApp". I do the following:

Create an app with "dotnet new angular"

Change name of the ClientApp folder to XClientApp

Make these changes in startup.cs:

 configuration.RootPath = "XClientApp/dist";
 ...
 spa.Options.SourcePath = "XClientApp";

Make this change in the project file:

 <SpaRoot>XClientApp\</SpaRoot>

The program runs if I press F5. But if I try to set a breakpoint via VS2019 in the Typescript code, I only see an open circle by the break point and the error "The breakpoint will not currently be hit. Breakpoint set but not yet bound."

But if I:

  1. run the app with F5
  2. press F12 in the Chrome Browser
  3. set a break point using the Chrome Dev Tools
  4. hit & clear the break point

Then breakpoints will start working in Visual Studio. But I don't want to go through this each time to get breakpoints working.

How can I change the name of ClientApp (and also change it's location) and still have breakpoints work?

I an using Visual Studio Pro 2019 Preview Version 16.3.0 Preview 2.0 and .Net Core 3.0.100-preview8-013656.

I already asked this question on stackoverflow.

SincGBA commented 3 years ago

Are there any news about this? I encounter this problem in an angular workspace. My folder structure is Workspace/project/projName/src instead of ClientApp/src so i need to completly rework the folderstructure