[racket] find-system-path under debugger
I think you need define-runtime-path instead.
Here's an example of its use:
;; Access a file "data.txt" at run-time that is originally
;; located in the same directory as the module source file:
(define-runtime-path sofa.dll
(format "sofa-~a-~a~a" sofa-version arch ""))
P.
============================
On Sun, Nov 30, 2014 at 5:39 PM, George Neuner <gneuner2 at comcast.net> wrote:
> Hi all,
>
> I've noticed that (find-system-path 'run-file) works differently under the
> debugger vs the command line.
>
> When I start an application from the command line - either as a linked
> executable or as a script using "racket <file>", (find-system-path
> 'run-file) gives me the start directory of the application. However, when I
> start under the debugger, (find-system-path 'run-file) gives me the
> directory where DrRacket is installed.
>
> I have an application that needs to read from some setup files that are
> under the same directory. (find-system-path 'run-file) works fine from the
> command line but I can't run the app in the debugger. Is there a way to find
> the directory of the file running under the debugger that also works when
> run from the command line? Or alternatively, a way to tell when you are
> running under the debugger so as to do something else?
>
> Thanks,
> George
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users