question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger not debugging some variables correctly

See original GitHub issue

This issue has been moved from a ticket on Developer Community.


Testing with a MAUI RC2 project in VS4Mac 2022 Preview (build 8754)

Simply in the MainPage class I am trying to debug the result of bleService.GetPlatform(). This should be a string of android, ios or windows.

If I hover over this variable to have the IDE tell me what it is it says it is null. This is also confirmed in the locals pane. However when I output the variable (as I do in the line above) I can see from the output panel that the variable is ios as expected.

Screenshot of it not working:
Screen Shot 2022-05-07 at 5.41.54 pm.png

Sample project I was using.
OpenOWDiag.zip

In this sample I was targeting a macOS build. In this specific case I am expecting my result to be ios even though this is macOS. However I don’t expect this to be the cause of the problem. I also tested to iOS simulator (I did need to delete iOS/BLEService.cs to build). Debugging on an Android phone worked as expected.


Original Comments

Feedback Bot on 5/7/2022, 02:04 AM:

(private comment, text removed)


Original Solutions

(no solutions)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:27 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
beeradmoorecommented, Jul 26, 2022

Another update: Still on Visual Studio for Mac v17.3 Preview 4 (build 2012). Just installed MAUI 6.0.424 and the problem seems to have gone away.

Again, I have no info of the internal ticket so not sure what it mentions as possible solutions. There is also no release notes for 424 yet. Does anyone know if this just fixed with this MAUI update or did something else change?

Screen Shot 2022-07-26 at 7 50 25 pm

1reaction
beeradmoorecommented, Jul 23, 2022

Understood, was just adding as much additional info as I can.

If it’s IDE issue should it be moved back to VS Dev community where it came from originally, or keep it here for visibly for people who come across the same issue?

As I can’t see the internal ticket is there any ETA, rough idea what is wrong (more of a curiosity thing, like why do some people not get it but I get it across 2 machines, is it not widespread), or any possible workarounds?

It’s been months where I’ve wanted to get started on MAUI but cant as this is a blocker. Aside from Gerald’s acknowledgement above it felt like both departments were playing hot potato trying to not take ownership of the issue and then went completely cold and maybe put on the backlog.

(Edit: re-reading this it comes off different than I intended. I don’t want it to sound ungrateful, or that this should be priority number 1, etc. Just eagerly awaiting it to be fixed)

Read more comments on GitHub >

github_iconTop Results From Across the Web

variable values not showing during debug vs 2019 16.2.4
If it not works, go Tools -> Options -> Debugging -> General to check both "Use the legacy C# and VB expression evaluators"...
Read more >
Variable values not showing correctly while debugging
I start a local debugging session and use a break point to break into a function. I would like to see the member...
Read more >
Debugger showing wrong variable values makes debug...
I tried some workarounds like copying the interesting values to other variables in different scopes, or disabling optimization for the ...
Read more >
Tips and tricks in the debugger - Visual Studio (Windows)
It's easy to view variables using debugger windows like the Watch window. However, when a variable goes out of scope in the Watch...
Read more >
mBED Studio Debugger not displaying variable values ...
On an NXP RT1050 EVKB using CMSIS/DAP to debug a simple program, it appears that the debugger is having a hard time correctly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found