Lisp HUG Maillist Archive

Compile and Debug quickload'ed CAPI app with LW7.0 for OSX

Hi,

I'm trying to write CAPI app and compile/load it locally via
quickload.
So I start the session, execute the (ql:quickload "myapp") and start
working.
When I do changes, I can recompile the buffers, restart the app
and see what my changes applied.

Here is the compilation output example:

;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 1
;;; Compilation speed = 1, Debug = 2, Fixnum safety = 3
;;; Source level debugging is on
;;; Source file recording is  on
;;; Cross referencing is on
; (TOP-LEVEL-FORM 0)
;;;*** Warning in (PACKAGE "MEDIAIMPORT-UI"): Using DEFPACKAGE to modify #<The
MEDIAIMPORT-UI package, 39/64 internal, 1/16 external>.
; (DEFPACKAGE "MEDIAIMPORT-UI")

However I cannot use a debugger. If I set the breakpoint using toolbar
it is ignored, if I set it manually via (break) function, the dialog
appears:

   Debug-Break in process "Cocoa Event Loop" {undebuggable process}

and no possibility to use source-level debug.
Nothing changes if I set (declaim (optimize (debug 3))) in the beginning
of the file or in REPL.

If I load any CAPI example using example-edit-file and compile it,
debugging works ok.

Is where a way to get debugging to work for my initially quickload'ed app?

-- 
Br,
/Alexey

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Compile and Debug quickload'ed CAPI app with LW7.0 for OSX

I would guess that setting breakpoints is part of the toolchain and that quicklisp is not (yet) part of the LW toolchain.  (Debuggers need to modify the actual code).

Try this: after quickloading, do file>>compile&load the file you want to debug.  Then set the breakpoint.

I generally use defsys.lisp and lispworks>>tools>>system browser to do builds in the LW toolchain.  That works.

pt

> On Mar 20, 2016, at 9:14 AM, Alexey Veretennikov <txm.fourier@gmail.com> wrote:
> 
> 
> Hi,
> 
> I'm trying to write CAPI app and compile/load it locally via
> quickload.
> So I start the session, execute the (ql:quickload "myapp") and start
> working.
> When I do changes, I can recompile the buffers, restart the app
> and see what my changes applied.
> 
> Here is the compilation output example:
> 
> ;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 1
> ;;; Compilation speed = 1, Debug = 2, Fixnum safety = 3
> ;;; Source level debugging is on
> ;;; Source file recording is  on
> ;;; Cross referencing is on
> ; (TOP-LEVEL-FORM 0)
> ;;;*** Warning in (PACKAGE "MEDIAIMPORT-UI"): Using DEFPACKAGE to modify #<The
> MEDIAIMPORT-UI package, 39/64 internal, 1/16 external>.
> ; (DEFPACKAGE "MEDIAIMPORT-UI")
> 
> However I cannot use a debugger. If I set the breakpoint using toolbar
> it is ignored, if I set it manually via (break) function, the dialog
> appears:
> 
>   Debug-Break in process "Cocoa Event Loop" {undebuggable process}
> 
> and no possibility to use source-level debug.
> Nothing changes if I set (declaim (optimize (debug 3))) in the beginning
> of the file or in REPL.
> 
> If I load any CAPI example using example-edit-file and compile it,
> debugging works ok.
> 
> Is where a way to get debugging to work for my initially quickload'ed app?
> 
> -- 
> Br,
> /Alexey
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Compile and Debug quickload'ed CAPI app with LW7.0 for OSX

Hi,

That is exactly what I thought should work, but this doesn't.

About defsys, should I keep 2 configuration files then: one asdf and
another defsys in order to debug with LW and deploy/manage external
dependencies with QL?


Paul Tarvydas <paultarvydas@gmail.com> writes:

> I would guess that setting breakpoints is part of the toolchain and that
> quicklisp is not (yet) part of the LW toolchain.  (Debuggers need to modify the
> actual code).
>
> Try this: after quickloading, do file>>compile&load the file you want to debug.
> Then set the breakpoint.
>
> I generally use defsys.lisp and lispworks>>tools>>system browser to do builds in
> the LW toolchain.  That works.
>
> pt
>
>> On Mar 20, 2016, at 9:14 AM, Alexey Veretennikov <txm.fourier@gmail.com> wrote:
>> 
>> 
>> Hi,
>> 
>> I'm trying to write CAPI app and compile/load it locally via
>> quickload.
>> So I start the session, execute the (ql:quickload "myapp") and start
>> working.
>> When I do changes, I can recompile the buffers, restart the app
>> and see what my changes applied.
>> 
>> Here is the compilation output example:
>> 
>> ;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 1
>> ;;; Compilation speed = 1, Debug = 2, Fixnum safety = 3
>> ;;; Source level debugging is on
>> ;;; Source file recording is  on
>> ;;; Cross referencing is on
>> ; (TOP-LEVEL-FORM 0)
>> ;;;*** Warning in (PACKAGE "MEDIAIMPORT-UI"): Using DEFPACKAGE to modify #<The
>> MEDIAIMPORT-UI package, 39/64 internal, 1/16 external>.
>> ; (DEFPACKAGE "MEDIAIMPORT-UI")
>> 
>> However I cannot use a debugger. If I set the breakpoint using toolbar
>> it is ignored, if I set it manually via (break) function, the dialog
>> appears:
>> 
>>   Debug-Break in process "Cocoa Event Loop" {undebuggable process}
>> 
>> and no possibility to use source-level debug.
>> Nothing changes if I set (declaim (optimize (debug 3))) in the beginning
>> of the file or in REPL.
>> 
>> If I load any CAPI example using example-edit-file and compile it,
>> debugging works ok.
>> 
>> Is where a way to get debugging to work for my initially quickload'ed app?
>> 
>> -- 
>> Br,
>> /Alexey
>> 
>> _______________________________________________
>> Lisp Hug - the mailing list for LispWorks users
>> lisp-hug@lispworks.com
>> http://www.lispworks.com/support/lisp-hug.html
>> 
>

-- 
Br,
/Alexey

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Compile and Debug quickload'ed CAPI app with LW7.0 for OSX

Hi,

I guess I was too fast for conclusions. Basically I can debug anything
except functions called from CAPI, i.e. I cannot debug callbacks or
different color-function/column-function etc.

Br
/Alexey

Paul Tarvydas <paultarvydas@gmail.com> writes:

> I would guess that setting breakpoints is part of the toolchain and that
> quicklisp is not (yet) part of the LW toolchain.  (Debuggers need to modify the
> actual code).
>
> Try this: after quickloading, do file>>compile&load the file you want to debug.
> Then set the breakpoint.
>
> I generally use defsys.lisp and lispworks>>tools>>system browser to do builds in
> the LW toolchain.  That works.
>
> pt
>
>> On Mar 20, 2016, at 9:14 AM, Alexey Veretennikov <txm.fourier@gmail.com> wrote:
>> 
>> 
>> Hi,
>> 
>> I'm trying to write CAPI app and compile/load it locally via
>> quickload.
>> So I start the session, execute the (ql:quickload "myapp") and start
>> working.
>> When I do changes, I can recompile the buffers, restart the app
>> and see what my changes applied.
>> 
>> Here is the compilation output example:
>> 
>> ;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 1
>> ;;; Compilation speed = 1, Debug = 2, Fixnum safety = 3
>> ;;; Source level debugging is on
>> ;;; Source file recording is  on
>> ;;; Cross referencing is on
>> ; (TOP-LEVEL-FORM 0)
>> ;;;*** Warning in (PACKAGE "MEDIAIMPORT-UI"): Using DEFPACKAGE to modify #<The
>> MEDIAIMPORT-UI package, 39/64 internal, 1/16 external>.
>> ; (DEFPACKAGE "MEDIAIMPORT-UI")
>> 
>> However I cannot use a debugger. If I set the breakpoint using toolbar
>> it is ignored, if I set it manually via (break) function, the dialog
>> appears:
>> 
>>   Debug-Break in process "Cocoa Event Loop" {undebuggable process}
>> 
>> and no possibility to use source-level debug.
>> Nothing changes if I set (declaim (optimize (debug 3))) in the beginning
>> of the file or in REPL.
>> 
>> If I load any CAPI example using example-edit-file and compile it,
>> debugging works ok.
>> 
>> Is where a way to get debugging to work for my initially quickload'ed app?
>> 
>> -- 
>> Br,
>> /Alexey
>> 
>> _______________________________________________
>> Lisp Hug - the mailing list for LispWorks users
>> lisp-hug@lispworks.com
>> http://www.lispworks.com/support/lisp-hug.html
>> 
>

-- 
Br,
/Alexey

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Compile and Debug quickload'ed CAPI app with LW7.0 for OSX

Hi,

Yes I'm on Cocoa and it looks like this problem is Cocoa specific. The
"spawning" another thread for UI doesn't work either. I can however
do the "printf-debugging", i.e. format produces output to the output
window, but it feels rather old-scool for expensive IDE, one of the selling
point of which is a UI framework and good IDE including a graphical
debugger :\

I guess however there could be some technical way to do the debugging anyway, like
gdbserver for C or swank/slime.

Paul Tarvydas <paultarvydas@gmail.com> writes:

> Hmmm, I can set a breakpoint on, say a menu callback and have it break.
>
> I'm using LWL7 Pro (linux).
>
> Oh, wait, you are using Cocoa.  Isn't there something "odd" with Cocoa - 
> I haven't used it yet (I haven't used the LWM debugger yet).  I seem to remember
> there being some restriction imposed by Apple - only one process for all UI's
> (or for all UI's belonging to one app)???
>
> If that's the case, then maybe someone more familiar with LWM can answer?
>
> Does "printf" debugging work in LWM - "(format ...)" to the "output window" of
> the LW repl?  Or, maybe you can spawn another "app" using the MP: package and
> have it accept debug messages???  Maybe you can use the "process browser" tool
> of LW to see if you are successfully spawning new apps.
>
> pt
>

-- 
Br,
/Alexey

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:32 UTC