-
Notifications
You must be signed in to change notification settings - Fork 12k
@angular-devkit/build-angular 0.801.3: breakpoints not working in vscode, baseHref is added to the resolved path #15211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, had a quick look at this and I was unable to reproduce. Can you confirm that you are adding the Can you setup a minimal repro please? You can read here why this is needed. A good way to make a minimal repro is to create a new app via This might be related to your directory structure so its really important to get an accurate repro to diagnose this. |
@alan-agius4 When I do this change then everything is working I'll try to create a minimal repro with the bug |
@alan-agius4 When I execute Have you added
|
@alan-agius4 |
@jmesa-sistel, probably this can be fixed by setting the Lines 93 to 97 in 5df50ba
|
The problem using |
@alan-agius4 |
@alan-agius4 |
The You can try adding it in Note: you’d need to restart I’ll try to take a look at this tomorrow. |
Not sure if linked, but breakpoints are also broken in Visual Studio, using the same version (@angular-devkit/build-angular 0.801.3). No basehref set though ........ Repro ('dotnet new angular' that has had package versions increased): Potentially(!) useful info: 0.801.3 doesn't: When setting a breakpoint in Visual Studio, the following is logged to C:\Users\xxxxxxx\AppData\Local\Temp\vscode-chrome-debug.txt:
|
@kccsf, can you provide the exact steps to replicate? Are you using build or serve? Can you also try patch to patch I’ll try to install Visual Studio the community version tomorrow and take a look at this. |
@alan-agius4 - great thanks. Once you have cloned the code you should just need to:
this.currentCount++;
Your browser should launch and once the page has loaded you will notice that the breakpoint changes colour and has an alert icon. Hovering over it gives a tooltip that reads 'The breakpoint will not currently be hit. Breakpoint set but not yet bound'. In the browser, clicking 'Counter' on the menu following by the 'Increment' button in the app confirms that the breakpoint does not get hit. With regard to patching utils.js - I have tried adding sourceRoot in the following manner to no avail:
I couldn't see an option for
I have tried changing that from |
Thanks @kccsf, thanks for trying this out. I will continue looking at it today. Regarding the |
@alan-agius4 PS:
Before change:
Will this change affect to trying to debug an application which was built on a CI server? |
I think I managed to find the sweet setting that will fix both issues for both the baseHref and Visual Studio.
With the above change we should address all the issues related to debugging in IDE's (or at least hope so) With Visual Studio the problem is that there is no way to set a Example
instead of
|
@alan-agius4 - Change confirmed working in Visual Studio. Many thanks :-) |
@alan-agius4
Thanks for helping fixing it |
Thanks all, for being so helpful and for confirming that the tentative fix work. Much appreciated. |
With this change we address 2 main issues related to unbound breakpoints: 1) in VS code when having a `baseHref` set. 2) Visual Studio when using an SPA inside a ASP.NET project For the latter, it seems that there is no way to set a `webRoot`. However, `webpack:///` seems to be handled internally and will be mapped to the `SpaRoot` ie `ClientApp` folder. Fixes: #15211
With this change we address 2 main issues related to unbound breakpoints: 1) in VS code when having a `baseHref` set. 2) Visual Studio when using an SPA inside a ASP.NET project For the latter, it seems that there is no way to set a `webRoot`. However, `webpack:///` seems to be handled internally and will be mapped to the `SpaRoot` ie `ClientApp` folder. Fixes: #15211
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: ....Yes, the previous version in which this bug was not present was: @angular-devkit/build-angular 0.801.0
Description
A clear and concise description of the problem...Breakpoints are not working in vscode in @angular-devkit/build-angular 0.801.3 version
Seems that baseHref is added in the resolve path
🔬 Minimal Reproduction
Try to debug a project in vscode adding baseHref in angular.json
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
When I execute
.scripts
in debug console I can see:- ./src/app/shared/iframe/iframe.component.html (c:\Proyectos\BPS\src\webapp\jira\src\app\shared\iframe\iframe.component.html)
and it should be:
- ./src/app/shared/iframe/iframe.component.html (c:\Proyectos\BPS\src\webapp\src\app\shared\iframe\iframe.component.html)
I can see
jira
word which is my base href in angular.json ("baseHref": "/jira/"
)To get breakpoints working again I have to add:
"./*": "${webRoot}/*",
tosourceMapPathOverrides
I created a new issue because I don't get any response in the issue #15116
The text was updated successfully, but these errors were encountered: