It is currently Thu Jan 28, 2021 3:18 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 8:27 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 04, 2015 7:10 am
Posts: 1678
How do I get access to the Debug menu tools? they're always disabled/grayed out.

Im using PB v5.31 x86 with mostly default settings, and nothing ive tried in Preferences has enabled the Debugger tools. Checking "Use Debugger" makes no difference. The "Integrated Debugger" is the one ive selected, but the other two dont allow enabled tools either, and I cant find anything in the Help file about it. Can't even use Step. I just checked my Mac-64 version and it's the same. Sorry for newbie question but i couldnt find a solution and would've thought these would all be enabled by default
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 8:44 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Feb 18, 2010 11:10 pm
Posts: 192
Just set a breakpoint somewhere (F9) or stop your program(F6) after running it.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 8:48 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 04, 2015 7:10 am
Posts: 1678
thats the Easter Egg i was after, thankyou

Im not sure how i was meant to ascertain that from the helpfile though, the word "breakpoint" doesn't even exist!

I wish Fred would open up the helpfile using Wiki format so users can contribute to it. So many times I go to the helpfile only to find it hasn't answered a question it should've because it only offers minimal details.

Quote:
Using the debugger

PureBasic provides a powerful debugger that helps you find mistakes and bugs in your source code. It lets you control the program execution, watch your variables, arrays or lists or display debug output of your programs. It also provides advanced features for assembly programmer to examine and modify the CPU registers or view the program stack, or the Memory of your program. It also provides the possibility to debug a program remotely over the network.

To enable the debugger for your program, you can select "Use Debugger" from the debugger menu, or set it in your programs Compiler options. By using the "Compile with Debugger" command from the Compiler menu, you can enable the debugger for just one compilation.

You can directly use debugger commands in your source, such as CallDebugger, Debug, DebugLevel, DisableDebugger and EnableDebugger.

The PureBasic debugger comes in 3 forms:

A Debugger integrated directly with the IDE, for an easy to use, quick way to debug your programs directly from the programming environment. This debugger also provides the most features.

A separate, standalone debugger, that is useful for some special purposes (for example, when the same program must be executed and debugged several times at once) or to be used with third party code Editors. It provides most of the features of the integrated IDE debugger, but because it is separate from the IDE, some of the efficiency of the direct access from the IDE is lost. The standalone debugger can be used to debug programs remotely through a network connection.

A console only debugger. This debuggers primary use is for testing non-graphical environment like on Linux systems without an X server, or to remotely develop through ssh.

The type of debugger that is used can be selected in the preferences.

All this debugging functionality however comes at a price. Running a program in debug mode is significantly slower in its execution that running it without the debugger. This should be no problem however, since this is for testing only anyway.
If you need to use the debugger, but have some parts in you program that require the full execution speed, you can disable the debugger in just that section with the DisableDebugger / EnableDebugger keywords.


Last edited by Keya on Sun Aug 30, 2015 8:54 am, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 8:49 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Feb 18, 2010 11:10 pm
Posts: 192
Or call debugging tools manually(ShowWatchlist(), ShowVariableViewer(), etc.) :)


Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 8:55 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Feb 18, 2010 11:10 pm
Posts: 192
It is mentioned at "Included debugging tools":
Quote:
These tools provide many features to inspect your program while it is running. They can not be used while you are editing the source code.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 9:16 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 6287
Location: Wales, UK
PB Help:
Line Break Points

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 9:30 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 04, 2015 7:10 am
Posts: 1678
Ok, I just would've thought that "Using the Debugger" would be the place to go to learn how to use the debugger... not "Line Break-points" (i was never even able to get that far!!) :)

And ostapas, that line you pasted still doesn't say anything about how to enable them, it just tells you when you can't use them, which doesn't really help :)


Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 9:35 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 6287
Location: Wales, UK
If you could just take a minute to see what's there Keya, you will see that Break Points are indeed under the title of Using the Debugger, as per my link :wink:

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 9:38 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1907
Keya wrote:
How do I get access to the Debug menu tools? they're always disabled/grayed out.

That's because you can't debug an app that isn't running. ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: How to access Debug menu tools? theyre always disabled
PostPosted: Sun Aug 30, 2015 9:43 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 04, 2015 7:10 am
Posts: 1678
Dude wrote:
Keya wrote:
How do I get access to the Debug menu tools? they're always disabled/grayed out.

That's because you can't debug an app that isn't running. ;)

I would've thought you'd be able to Step Into it to start debugging, i didnt realise you had to set a Breakpoint on the first line. Again not clarified in the helpfile.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye