I want to debug typescript in a MAUI Blazor app, but I am not able to do that with Visual Studio 2022 or F12 developer tools (Edge).
Does anybody know if it is possible to set breakpoints in Typescript in a MAUI Blazor app?
If you use a Blazor Server App it is working... but not in MAUI Blazor App...
Install Extension "Web compiler 2022+" in Visual Studio 2022 (Extensions => Manage extensions and install it) and restart it
I created a sample app:
- Create new MAUI Blazor app (.net 7)
- Add NuGet-Package "Microsoft.TypeScript.MSBuild"
- Add tsconfig file
- Add Typescript-File "test1.ts" in wwwroot-folder -> js-File + js.map-File is generated...
- Add test1.js - Reference in index.html
- Add button in Index.razor which calls TypeScript-Function:
Execute app (Windows Machine) - Alert is shown (OK):
Now I want to debug the method "sayHello", which was created in TypeScript.
- Setting a breakpoint in Visual Studio does not work:
- In the browser (F12 developer tools") test1.js is visible in Sources... but not the js.map or the ts-file:
Is there any option to debug the TypeScript file directly?