When following instructions in the docs (Debug SharePoint Framework solutions in Visual Studio Code), debugging projects in VSCode with Chrome should work.
Breakpoints aren't hit.
Reason: hint path for sourceMapPathOverrides in launch.config is no longer correct for latest recent SPFx projects (v1.5.* => current [1.7]).
[..]WebPart.render() method's return .. lineStart web server: gulp serve
NOTE: Can't use
gulp serve --nobrowseras the runtime packages aren't added to load the local API server / local workbench. This is a somewhat related, but not directly related issue
Close & quit all instances of Chrome
After step 1 above, after creating the project...
sourceMapPathOverrides array:"webpack:///.././src/*": "${webRoot}/src/*",
Consider removing the other options... not sure if they are still possibilities...
The problem is a change to the project structure in the generated files by the SPFx Yeoman generator change the path where webpack thinks the files are located.
These can be closed when this bug is fixed: #2062, #2267, #2831
Thanks.
Why did this get closed? The issue is still present. Even if it was fixed on the pre-release codebase for the next SPFx release, it shouldn't be closed until it's actually released and fixed.
I've the same issue, and even with the workarounds I can't debug... is there any update? it's quite critical, thanks in advance
I had the same issue and this workaround fixed it! Cheers @andrewconnell
@MarianoPrz ... you modified the launch.json config & the breakpoint isn't getting hit? Can you describe exactly what's happening?
I can't debug
Need a bit more info to understand what's not working & what you're doing.
This was fixed in 1.7.1
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues
Most helpful comment
Why did this get closed? The issue is still present. Even if it was fixed on the pre-release codebase for the next SPFx release, it shouldn't be closed until it's actually released and fixed.