[racket] Debugging multiple modules in DrRacket

37 views
Skip to first unread message

Harry Spier

unread,
Jun 1, 2012, 10:12:37 PM6/1/12
to users
I have a main module which requires other modules. I'm trying to
debug one of those modules using the debugger in DrRacket. (I'm using
windows Vista and the latest Racket.

I open two tabs in DrRacket, one with the main module and one with
the module I'm trying to debug (lets call it M). I click the debug
icon in the main module and set a breakpoint just before the call to
the procedure in module M. I then step through the call to this
procedure and the second tab opens with module M but there are no
debug icons available and I can't step through module M.

I then tried first opening the tab with module M and clicking on the
debug icon and then opening the tab with the main module and clicking
on debug and setting the breakpoint etc. but when I stepped into
module M, the debug icons were available but appeared to be disabled
(i.e. lighter color and didn't respond to clicking).

Section 1.8.4 for DrRacket says:
------------------------------------
1.8.4 Debugging Multiple Files

To debug a program that spans several files, make sure that all of the
files are open in DrRacket. Click the Debug button in the window
containing the main program. As this program loads additional files
that are present in other windows or tabs, message boxes will pop up
asking whether or not to include the file in the debugging session.
Including the file means that it will be possible to set breakpoints,
inspect variables, and single-step in that file.
-------------------------------------

But no message boxes popped up asking me whether I want to include
files in the debugging session..

In the Choose Language menu I have "Debugging" chosen under dynamic properties.

Can anyone suggest what might be the problem.

Thanks,
Harry
____________________
Racket Users list:
http://lists.racket-lang.org/users

Robby Findler

unread,
Jun 2, 2012, 2:46:38 PM6/2/12
to Harry Spier, users
I've just pushed a change that seems to fix this, but reading over the
code and experimenting with it a bit, I'm not sure why it is seeing
the callbacks into the eval-handler in the order that it is seeing
them so I'm not sure that my fix is the right one.

Also, one thing to note: if there are compiled .zo files, then the
debugger doesn't debug those files. I believe this is just showing the
age of the debugger and isn't a fundamental limitation (in particular,
the debugger could stash .zo files with the annotations in them the
way that errortrace does).

But I think that this means that you should probably turn off the
automatic zo file creation option in the module language, or else you
still won't be able to debug those files.

Robby

Harry Spier

unread,
Jun 2, 2012, 5:12:16 PM6/2/12
to Robby Findler, users
On Sat, Jun 2, 2012 at 2:46 PM, Robby Findler
<ro...@eecs.northwestern.edu> wrote:

> But I think that this means that you should probably turn off the
> automatic zo file creation option in the module language, or else you
> still won't be able to debug those files.
>
Thanks Robby.

Do you mean the ---"Populate "compiled" directories (for faster
loading)--- option
under dynamic properties of "Choose language" menu.

Robby Findler

unread,
Jun 2, 2012, 6:35:27 PM6/2/12
to Harry Spier, users
On Sat, Jun 2, 2012 at 4:12 PM, Harry Spier <vasisht...@gmail.com> wrote:
> On Sat, Jun 2, 2012 at 2:46 PM, Robby Findler
> <ro...@eecs.northwestern.edu> wrote:
>
>> But I think that this means that you should probably turn off the
>> automatic zo file creation option in the module language, or else you
>> still won't be able to debug those files.
>>
> Thanks Robby.
>
> Do you mean the ---"Populate "compiled" directories (for faster
> loading)--- option
> under dynamic properties of "Choose language" menu.

Yes, exactly.

Robby

Harry Spier

unread,
Jun 3, 2012, 3:11:54 PM6/3/12
to Robby Findler, users
Is this just a Racket on Windows problem or in all implementations.

On Sat, Jun 2, 2012 at 2:46 PM, Robby Findler
<ro...@eecs.northwestern.edu> wrote:

Robby Findler

unread,
Jun 3, 2012, 9:38:54 PM6/3/12
to Harry Spier, users, Robby Findler
This problem is not windows-specific.

Robby
Reply all
Reply to author
Forward
0 new messages