Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » no variables in debug mode
no variables in debug mode [message #58796] Fri, 02 September 2022 21:58 Go to next message
superdev is currently offline  superdev
Messages: 24
Registered: August 2022
Promising Member
Trying to debug GUI app (debug mode, full debug info).
But all watches are "undefined" and tabs "autos", "locals", "this" are empty.


Win7x64, upp-win-17059
Re: no variables in debug mode [message #58797 is a reply to message #58796] Fri, 02 September 2022 23:05 Go to previous messageGo to next message
peterh is currently offline  peterh
Messages: 108
Registered: November 2018
Location: Germany
Experienced Member
Sounds unusual.
Current stable build is Build 16270, try this.
I had recently unusual effects, Reasons where this:

1)
I unpacked the update into my existing c:\upp directoy tree without previously deleting the contents. This caused problems.
2)
Upp autodetected compilers that where on a backup drive, but these where not installed in the OS.
(This was a drive that previously was C: in my old computer and I installed it as backup and to get the data as a second drive into my new computer)
This seemed to work, but caused problems later. If this is the case donot use these compilers.

Install the current stable or later build into a fresh and empty directory structure.
Do not use compilers where you are not sure if they are properly installed.
If possible use the supplied CLang compiler.

I have used the stable build and currently use a nightly build and have not seen problems since I use this method.
If you use external compilers make sure they are properly installed, possibly re-install them.

I have Visual Studio 2022 installed and this compiler seems to work. However I do not use it.
If you cannot use the CLang compiler then at least try it and compare if there are the same problems.

If the problems persists, probably more information about the installation and compiler is needed.
I am not a regular userr here, I use Upp only occasionally, but this often, for learning purposes and have not seen such problems.

[Updated on: Fri, 02 September 2022 23:17]

Report message to a moderator

Re: no variables in debug mode [message #58803 is a reply to message #58797] Mon, 05 September 2022 00:49 Go to previous messageGo to next message
superdev is currently offline  superdev
Messages: 24
Registered: August 2022
Promising Member
peterh wrote on Fri, 02 September 2022 23:05
...

Actually there are vars in "autos" (and they can be watched) but only global ones. It's like i'm missing smth.
I use the compiler supplied with upp-win-16236.
I've changed some options. I'm not sure they are related to this problem.
I'll try fresh stable build later.


Win7x64, upp-win-17059

[Updated on: Tue, 06 September 2022 19:18]

Report message to a moderator

Re: no variables in debug mode [message #58804 is a reply to message #58796] Mon, 05 September 2022 00:54 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1135
Registered: August 2007
Senior Contributor
I can confirm this.

I tried with the last night's build (clean). No variables were shown...



Best regards,
Oblivion


Re: no variables in debug mode [message #58805 is a reply to message #58804] Mon, 05 September 2022 05:01 Go to previous messageGo to next message
peterh is currently offline  peterh
Messages: 108
Registered: November 2018
Location: Germany
Experienced Member
Hhm, I do only simple stuff. I see this:

index.php?t=getfile&id=6656&private=0
Autos are shown.
In "Locals" however, "count" is not shown, "this" and "w" (procedure params) are shown.
Buid 16323

Edit:
If I add them to a watch I see all in the watch.
I have only a very small test-project, maybe this makes a difference.
  • Attachment: locals.jpg
    (Size: 77.50KB, Downloaded 297 times)

[Updated on: Mon, 05 September 2022 12:03]

Report message to a moderator

Re: no variables in debug mode [message #58831 is a reply to message #58805] Thu, 15 September 2022 21:29 Go to previous messageGo to next message
superdev is currently offline  superdev
Messages: 24
Registered: August 2022
Promising Member
Also is there way to determine debug/release in code?

Win7x64, upp-win-17059
Re: no variables in debug mode [message #58832 is a reply to message #58831] Fri, 16 September 2022 05:37 Go to previous messageGo to next message
peterh is currently offline  peterh
Messages: 108
Registered: November 2018
Location: Germany
Experienced Member
There is a call "IsDebuggerPresent()" which tells you if a debugger is attached.
(This will probably also return "true" if the program was compiled in release mode and a debugger is attached)

Also there are logging macros which are only compiled in debug mode.
So there must be a macro (preprocessor symbol) which is defined in debug mode only, but I do not know the name.
Possibly study the logging macros and their source to see how this works.

Alternatively you can add your own macro to the compiler options.

[Updated on: Fri, 16 September 2022 06:28]

Report message to a moderator

Re: no variables in debug mode [message #58851 is a reply to message #58832] Sat, 17 September 2022 16:57 Go to previous message
superdev is currently offline  superdev
Messages: 24
Registered: August 2022
Promising Member
peterh wrote on Fri, 16 September 2022 05:37
There is a call "IsDebuggerPresent()" which tells you if a debugger is attached.
(This will probably also return "true" if the program was compiled in release mode and a debugger is attached)

Also there are logging macros which are only compiled in debug mode.
So there must be a macro (preprocessor symbol) which is defined in debug mode only, but I do not know the name.
Possibly study the logging macros and their source to see how this works.

Alternatively you can add your own macro to the compiler options.

Good idea, thanks. Found it: _DEBUG


Win7x64, upp-win-17059
Previous Topic: [solved] Widget events - any other than WhenAction ?
Next Topic: Reducing image colors with sPalMaker / sPalCv
Goto Forum:
  


Current Time: Fri Nov 01 00:51:09 CET 2024

Total time taken to generate the page: 0.02328 seconds