How to hit breakpoint when script called by AutoCAD (not run from VLisp)

How to hit breakpoint when script called by AutoCAD (not run from VLisp)

Anonymous
Not applicable
999 Views
2 Replies
Message 1 of 3

How to hit breakpoint when script called by AutoCAD (not run from VLisp)

Anonymous
Not applicable

(Sorry if it's a newbie question - relatively good programmer here but new to AutoLISP and Visual LISP...)

 

I get how one can add breakpoints and debug some script when running from the VLIPS IDE... but how can I have a breakpoint hit in the function when you're trying to debug something that's in a .lsp file that's loaded and called by another .lsp file, which is in turn called by a function in acaddoc.lsp??

 

Couldn't find documentation (nor posts) on the topic...

 

Thanks in advance...

Steve

 

 

0 Likes
1,000 Views
2 Replies
Replies (2)
Message 2 of 3

dbroad
Mentor
Mentor

You probably should read the calling programs and find the load statements.  In vlide, open the called programs and load them once.  Then the debugging process will find flaws in the called programs.  Best approach though, IMO, is bottom up testing.  If you don't load the subfunctions in vlide, it should still give you information about where the program breaks if you turn on "break on error" in the debug options.

 

Does that answer your question?

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 3

stevor
Collaborator
Collaborator

Depending on your intention for 'breakpoint,'

the getstring function would pause the execution

until the enter key was 'hit,' or you could add

timer functions for temporary pauses.

And a princ function to show the location of each

'breakpoint' with a descriptive string.

S
0 Likes