|
|
Home » Community » Newbie corner » no variables in debug mode
no variables in debug mode [message #58796] |
Fri, 02 September 2022 21:58 |
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 |
|
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 |
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 #58832 is a reply to message #58831] |
Fri, 16 September 2022 05:37 |
|
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 |
superdev
Messages: 24 Registered: August 2022
|
Promising Member |
|
|
peterh wrote on Fri, 16 September 2022 05:37There 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
|
|
|
Goto Forum:
Current Time: Fri Nov 01 00:00:30 CET 2024
Total time taken to generate the page: 0.02767 seconds
|
|
|