Fix adding a breakpoint in a JS file while debugging a blazor app #1488
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When adding a breakpoint the urlRegex passed to a blazor app for a js app before this PR was:
"[fF][iI][lL][eE]:\/\/\/[tT]:\/[tT][hH][aA][yY][sS]\/[oO][fF][fF][iI][cC][eE]-[aA][dD][dD]-[iI][nN]-[sS][aA][mM][pP][lL][eE][sS]\/[sS][aA][mM][pP][lL][eE][sS]\/[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[pP][aA][gG][eE][sS]\/[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS|[tT]:\\[tT][hH][aA][yY][sS]\\[oO][fF][fF][iI][cC][eE]-[aA][dD][dD]-[iI][nN]-[sS][aA][mM][pP][lL][eE][sS]\\[sS][aA][mM][pP][lL][eE][sS]\\[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[pP][aA][gG][eE][sS]\\[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS"
And using this PR will be:
[fF][iI][lL][eE]:\/\/\/[tT]:\/[tT][hH][aA][yY][sS]\/[oO][fF][fF][iI][cC][eE]-[aA][dD][dD]-[iI][nN]-[sS][aA][mM][pP][lL][eE][sS]\/[sS][aA][mM][pP][lL][eE][sS]\/[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\/[pP][aA][gG][eE][sS]\/[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS|[tT]:\\[tT][hH][aA][yY][sS]\\[oO][fF][fF][iI][cC][eE]-[aA][dD][dD]-[iI][nN]-[sS][aA][mM][pP][lL][eE][sS]\\[sS][aA][mM][pP][lL][eE][sS]\\[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[eE][xX][cC][eE][lL]-[bB][lL][aA][zZ][oO][rR]-[aA][dD][dD]-[iI][nN]\\[pP][aA][gG][eE][sS]\\[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS|[hH][tT][tT][pP][sS]:\/\/[lL][oO][cC][aA][lL][hH][oO][sS][tT]:7287\/[pP][aA][gG][eE][sS]\/[iI][nN][dD][eE][xX]\.[rR][aA][zZ][oO][rR]\.[jJ]sS"
Adding the https://localhost:7287/pages/index.razor.js as it's done when debugging without using blazorSourcePath.
Without the PR it was necessary to disable and enable the breakpoint after the APP is already started to bind the breakpoint.
Related to OfficeDev/Office-Add-in-samples#444