File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 4
4
- Debug from .csproj and .sln [ #5876 ] ( https://github.com/dotnet/vscode-csharp/issues/5876 )
5
5
6
6
# 2.89.x
7
+ * Register Blazor WASM debugger in Razor Cohosting (PR: [ #8511 ] ( https://github.com/dotnet/vscode-csharp/pull/8511 ) )
7
8
* Bump Razor to 10.0.0-preview.25411.5 (PR: [ #8512 ] ( https://github.com/dotnet/vscode-csharp/pull/8512 ) )
8
9
* Fix VS Code cohosting completion when Razor and C# are valid (PR: [ #12096 ] ( https://github.com/dotnet/razor/pull/12096 ) )
9
10
* Fix null reference exception in formatting (PR: [ #12097 ] ( https://github.com/dotnet/razor/pull/12097 ) )
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ import { FormattingHandler } from '../../razor/src/formatting/formattingHandler'
52
52
import { ReportIssueCommand } from '../../razor/src/diagnostics/reportIssueCommand' ;
53
53
import { HtmlDocument } from './htmlDocument' ;
54
54
import { HtmlForwardedRequest } from './htmlForwardedRequest' ;
55
+ import { BlazorDebugConfigurationProvider } from '../../razor/src/blazorDebug/blazorDebugConfigurationProvider' ;
55
56
56
57
export function registerRazorEndpoints (
57
58
context : vscode . ExtensionContext ,
@@ -67,6 +68,8 @@ export function registerRazorEndpoints(
67
68
if ( razorOptions . cohostingEnabled ) {
68
69
vscode . commands . executeCommand ( 'setContext' , 'razor.mode' , 'cohosting' ) ;
69
70
registerCohostingEndpoints ( ) ;
71
+
72
+ context . subscriptions . push ( BlazorDebugConfigurationProvider . register ( razorLogger , vscode ) ) ;
70
73
} else {
71
74
vscode . commands . executeCommand ( 'setContext' , 'razor.mode' , 'lsp' ) ;
72
75
registerNonCohostingEndpoints ( ) ;
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurati
23
23
24
24
constructor ( private readonly logger : RazorLogger , private readonly vscodeType : typeof vscode ) { }
25
25
26
+ public static register ( logger : RazorLogger , vscodeType : typeof vscode ) {
27
+ const provider = new BlazorDebugConfigurationProvider ( logger , vscodeType ) ;
28
+ return vscodeType . debug . registerDebugConfigurationProvider ( 'blazorwasm' , provider ) ;
29
+ }
30
+
26
31
public async resolveDebugConfiguration (
27
32
folder : vscode . WorkspaceFolder | undefined ,
28
33
configuration : vscode . DebugConfiguration
Original file line number Diff line number Diff line change @@ -310,8 +310,7 @@ export async function activate(
310
310
localRegistrations . length = 0 ;
311
311
} ) ;
312
312
313
- const provider = new BlazorDebugConfigurationProvider ( logger , vscodeType ) ;
314
- context . subscriptions . push ( vscodeType . debug . registerDebugConfigurationProvider ( 'blazorwasm' , provider ) ) ;
313
+ context . subscriptions . push ( BlazorDebugConfigurationProvider . register ( logger , vscodeType ) ) ;
315
314
316
315
languageServerClient . onStarted ( async ( ) => {
317
316
await documentManager . initialize ( ) ;
You can’t perform that action at this time.
0 commit comments