Paul Kallenberg 0 Posted March 18, 2021 I am using Delphi 10.4 and C++ Builder 10.4 Update 2, with TwineCompile 5.2.3.302 and Modern C++ Compiler. I have 2 questions. 1. When rightclicking on a variable or method and then choosing Find Declaration I expect to go to the declaration. However, I don't see any response. What do I have to do to make this work, or is this a bug? 2. When running my application I set a breakpoint at a certain line of code. When this line is hit, I try to read the content of a variable in that line via Run -> Add Watch. Too often this gives me only 4 question marks instead of the content asked for. Again, what do I have to do to make this work, or is this a bug? Share this post Link to post
PhilPlus 6 Posted March 18, 2021 1/ This function doesn't work when executing the code only in 'dev' mode. Sometimes it doesn't work if the source code is not founded. 2/ Not very clear : any picture of your problem ? Share this post Link to post
Paul Kallenberg 0 Posted March 18, 2021 1. I'm not sure if the code is executed in 'dev' mode. How can I check? 2. Here is a picture. The code is stopped at breakpoint at line 149. On 148, it says int r = 6. On the left I watch r. I expect to see a Value of 6. However, it shows 4 question marks. Share this post Link to post
Roger Cigol 107 Posted March 19, 2021 I think this is because the compiler has optimised the variable away (in effect it has replaced your code with Grid->Row = 6;). So the debugger can't find the variable r because it doesn't exist. The usual settings for compiling under "debug" settings is for optimisations to be turned off. But you can change all these under the project | options. First thing to check is under Project | Options | C++ Compiler | Optimizations | disable all optimizations -> make sure this is set to "true" Share this post Link to post
Paul Kallenberg 0 Posted March 19, 2021 Roger, I checked that. disable all optimizations is set to "true". Any other suggestions? Share this post Link to post