Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1774

How to use ocamldebug to debug the rescript-vscode analysis step by step?

$
0
0

Hi @Mng12345, I’m trying to run this as well after the code was moved from rescript-vscode to rescript.

I keep running into:

Loading program... Fatal error: cannot load shared library dllext_stubs
Reason: dlopen(dllext_stubs.so, 0x000A): tried: 'dllext_stubs.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OSdllext_stubs.so' (no such file), '/usr/lib/dllext_stubs.so' (no such file, not in dyld cache), 'dllext_stubs.so' (no such file)

I do find that so file though in

 ls _build/default/compiler/ext/*so
_build/default/compiler/ext/dllext_stubs.so

LD_LIBRARY_PATH=/Users/nojaf/Projects/rescript/_build/default/compiler/ext does not seem to work for me on Mac.

Longshot but any thoughts?

Update:

Setting CAML_LD_LIBRARY_PATH solved my problem.

earlybird config:

        {
            "name": "Debug analysis",
            "type": "ocaml.earlybird",
            "request": "launch",
            "program": "${workspaceFolder}/_build/default/analysis/bin/main.bc",
            "stopOnEntry": true,
            "cwd": "/Users/nojaf/Projects/a-squirtle-tale",
            "env": {
                "CAML_LD_LIBRARY_PATH": "${workspaceFolder}/_build/default/compiler/ext"
            },
            "arguments": [
                "test",
                "src/Main.res"
            ]
        }

Viewing all articles
Browse latest Browse all 1774

Trending Articles