Closed RaoulRSV closed 6 months ago
Hi Raoul, while trying to debug your issue(s) I ran into many of the same issues (unable to break on C#, unable to open the Developer Tools on the Task Pane window). I found that starting Visual Studio as Administrator helped and did get my C# to break and open the Task Pane developer tools. Can you try to see if that works for you as wel?
Hi Maarten, Concerning C# break point : I tried my project and your seminal project as administrator with no success. Concerning "open the Developer Tools on the Task Pane window" I am not sure to understand your point but on my side I didn't discover any problem in accessing developping tools either on visual basic 2022 ou on chrome. Concerning JS debugging : my problems where probably due to a bug in my project. I am still working on it before confirming the point. Sincerly
Hi @RaoulRSV With my comment on "Open the Developer Tools on the Taskpane", what I meant is that it was failing for me to right click the Taskpane to open the 'web' developer tools. It gives me a white screen and nothing else, unless I started running the VS Project 'as administrator'. By doing so I got the normal browser developer tools available.
I was thinking, where are your breakpoints? Are they on the pages/scripts that are triggered by the Ribbon, or are they visible in the Taskpane? I think, but need more investigation on that, is that the pages triggered by the Ribbon are in a separate 'session' and therefore not showing up when you hit the breakpoint.
Overall, the debugging experience is not a joy 😉
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!
Hi Maarten. For me, as a regular user (not administrator), right click/inspect on the taskpane does open the Chrome web devtool for me with no white screen. C# breakpoints tested were placed on the pages/scripts whether it is :
Hi @aafvstam - Could you please help with the query above?
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!
Hi Maarten, how is it possible to help?
@RaoulRSV I have created a new branch where I'll try to solve/research the items you also mentioned here: https://github.com/OfficeDev/Office-Add-in-samples/issues/535#issuecomment-1607065032
My branch can be found here: https://github.com/aafvstam/Office-Add-in-samples/tree/aafvstam-blazor-addin-commands
Keep you updated ...
Hi @RaoulRSV, I just submitted a PR #596 to ensure the Blazor samples are configured for C# debugging. This may help this issue. Please let me know if you still need any assistance on this issue.
Thanks! David
@davidchesnut. Thank you for your commitment on this issue. Sure, I am still interested in it
Sorry for the late response. Due to some personal events, I wasn't able to respond sooner. I just did a quick test to see if the debugger was working and was happy to see that breakpoints were hit in both CS and JS. This is recorded in my Live Stream. We can have some contact later on to see where your issue occurs. I was using the latest version (Version 17.8.6) and both the Excel and Word project were working, however this obviously is in the original sample code using .NET 6. I will be porting to .NET 8 in the coming week(s) and check if debugging still works there. Let's keep in contact (you already found me on LinkedIn) to get this to work.
Maarten
@aafvstam Thank you for your answer. I confirm you that now I can also see breakpoints in C# with the Excel-blazor-addin template (from github office-addin-samples-main) with the latest version of Visual-studio 2022 and .NET 6. It occures with an unharmful avertissement from Microsoft-WebAssembly.Diagnostics.Devtools Proxy saying "DotNetDebugger.set Debugger Property 'wasn't found" code -32601 However, with my project I still cannot see breakpoints in C#. This project is derived from the Excel-blazor-addin template with perhaps a previous version and is using .NET 8. I will test .NET 6 in the next days
@aafvstam I did test the Excel-blazor-addin template with .NET8.0. It failed to run the complement with the following message : "Process with Id26228 was not executed" (Note : this message is my translation from french). The same message eventually mention also "Id2172". I remind having been faced with the same issue when upgrading to .NET8.0 but I don't recall how I did workaround it.
I did also test my project with .NET6.0 : C# breakpoints were similarly not effective.
Interesting, I upgraded the Blazor Samples to .NET 8 (8.0.1) yesterday, and I was actually able to see and use the breakpoints in both C# and JS.
The Pull Request has not been approved yet, so you need to go to my Fork to get the code from my PR: https://github.com/aafvstam/Office-Add-in-samples/tree/aafvstam-update-net-8
Can you try to simply clone the repo and hit F5 to build and run?
My YouTube recording is not listed yet (need to do some editing on the properties before publish) but you should be able to follow along here: Live Coding Session 20240201
Let me know what your findings are on the PR code here ...
My PR has been approved so the link above is obsolete but debugging should work now and this could be closed.
With things related to JS debugging, I too find this still challenging as often it doesn't update the cache and still runs against 'old' code. What I do here is check in Developer Tools to see if it has the updates, otherwise refresh cache from there and rerun.
I think we can close this, from what I have tested it is now working properly.
Also, the item did not get any feedback lately that it was not working, so if not, reopen a new issue referencing this one to follow up and start a new process.
Debugging a project build on the "Blazor Addin" template gives me hard time.
This behaviour seems to worsen with the size of the code. Question I am looking for any suggestion on how to handle this issue and