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 44- Debug from .csproj and .sln [ #5876 ] ( https://github.com/dotnet/vscode-csharp/issues/5876 )
55
66# 2.89.x
7+ * Register Blazor WASM debugger in Razor Cohosting (PR: [ #8511 ] ( https://github.com/dotnet/vscode-csharp/pull/8511 ) )
78* Bump Razor to 10.0.0-preview.25411.5 (PR: [ #8512 ] ( https://github.com/dotnet/vscode-csharp/pull/8512 ) )
89 * Fix VS Code cohosting completion when Razor and C# are valid (PR: [ #12096 ] ( https://github.com/dotnet/razor/pull/12096 ) )
910 * 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'
5252import { ReportIssueCommand } from '../../razor/src/diagnostics/reportIssueCommand' ;
5353import { HtmlDocument } from './htmlDocument' ;
5454import { HtmlForwardedRequest } from './htmlForwardedRequest' ;
55+ import { BlazorDebugConfigurationProvider } from '../../razor/src/blazorDebug/blazorDebugConfigurationProvider' ;
5556
5657export function registerRazorEndpoints (
5758 context : vscode . ExtensionContext ,
@@ -67,6 +68,8 @@ export function registerRazorEndpoints(
6768 if ( razorOptions . cohostingEnabled ) {
6869 vscode . commands . executeCommand ( 'setContext' , 'razor.mode' , 'cohosting' ) ;
6970 registerCohostingEndpoints ( ) ;
71+
72+ context . subscriptions . push ( BlazorDebugConfigurationProvider . register ( razorLogger , vscode ) ) ;
7073 } else {
7174 vscode . commands . executeCommand ( 'setContext' , 'razor.mode' , 'lsp' ) ;
7275 registerNonCohostingEndpoints ( ) ;
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurati
2323
2424 constructor ( private readonly logger : RazorLogger , private readonly vscodeType : typeof vscode ) { }
2525
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+
2631 public async resolveDebugConfiguration (
2732 folder : vscode . WorkspaceFolder | undefined ,
2833 configuration : vscode . DebugConfiguration
Original file line number Diff line number Diff line change @@ -310,8 +310,7 @@ export async function activate(
310310 localRegistrations . length = 0 ;
311311 } ) ;
312312
313- const provider = new BlazorDebugConfigurationProvider ( logger , vscodeType ) ;
314- context . subscriptions . push ( vscodeType . debug . registerDebugConfigurationProvider ( 'blazorwasm' , provider ) ) ;
313+ context . subscriptions . push ( BlazorDebugConfigurationProvider . register ( logger , vscodeType ) ) ;
315314
316315 languageServerClient . onStarted ( async ( ) => {
317316 await documentManager . initialize ( ) ;
You can’t perform that action at this time.
0 commit comments