在VSCode 1.12.2/Linux Mint上使用--pkg libvala-0.36開發Vala(libvala)程序18.運行F5調試會話,我可以設置斷點並查看局部變量值。但我似乎無法讓Vala對象顯示類數據而不是地址。例如:使用libvala-0.36調試VSCode需要調試符號?
foreach (Vala.SourceFile src in context.get_source_files()) {
var source = find_source_file (src.filename) ;
在調試窗口(和鼠標懸停)顯示的src:對象@#* 0x660aa0代替Vala.SourceFile類對象。我猜測沒有加載libvala符號表? 「apt搜索」顯示安裝了libvala-0.36-0-dbg和libvala-0.36-dev軟件包,但不知道如何使用它們。
使用谷歌搜索,我找到了「valac-dbgsym」的引用。所以我試着...
sudo apt-get install valac-dbgsym
E: Unable to locate package valac-dbgsym
感謝您的幫助/洞察我做錯了什麼。我的目標是運行調試並顯示Vala。 Debug窗口中的類對象數據。 感謝您的幫助!
[email protected] ~ $ sudo apt search libvala
p libvala-0.30-0 - C# like language for the GObject system -
p libvala-0.30-0:i386 - C# like language for the GObject system -
p libvala-0.30-0-dbg - C# like language for the GObject system -
p libvala-0.30-0-dbg:i386 - C# like language for the GObject system -
p libvala-0.30-dev - C# like language for the GObject system -
p libvala-0.30-dev:i386 - C# like language for the GObject system -
p libvala-0.34-0 - C# like language for the GObject system -
p libvala-0.34-0:i386 - C# like language for the GObject system -
p libvala-0.34-0-dbg - C# like language for the GObject system -
p libvala-0.34-0-dbg:i386 - C# like language for the GObject system -
p libvala-0.34-dev - C# like language for the GObject system -
p libvala-0.34-dev:i386 - C# like language for the GObject system -
i libvala-0.36-0 - C# like language for the GObject system -
p libvala-0.36-0:i386 - C# like language for the GObject system -
i libvala-0.36-0-dbg - C# like language for the GObject system -
p libvala-0.36-0-dbg:i386 - C# like language for the GObject system -
i libvala-0.36-dev - C# like language for the GObject system -
p libvala-0.36-dev:i386 - C# like language for the GObject system -
v libvala-dev -
v libvala-dev:i386 -
p libvaladoc-data - API documentation generator for vala (data
v libvaladoc-data:i386 -
p libvaladoc-dev - API documentation generator for vala (deve
p libvaladoc-dev:i386 - API documentation generator for vala (deve
p libvaladoc3 - API documentation generator for vala (libr
p libvaladoc3:i386 - API documentation generator for vala (libr
===========================================================================
----------building CSharp2Vala.exe
===========================================================================
valac -X -I/media/george/SharedData/Projects/Vala/vala-extra-vapis/ --verbose --vapidir=/media/george/SharedData/P
rojects/Vala/osslibs/ --girdir=/media/george/SharedData/Projects/Vala/osslibs/ --pkg gio-2.0 --define=DEBUG --save
-temps -g -X -w \
--pkg libvala-0.36 \
--pkg gee-0.8 \
-X -DGETTEXT_PACKAGE="..." \
-X -I/media/george/SharedData/Projects/Vala/CSharp2Vala/Echo-src/lib \
-X /media/george/SharedData/Projects/Vala/CSharp2Vala/Echo-src/lib/libecho.so \
/media/george/SharedData/Projects/Vala/CSharp2Vala/Echo-src/lib/libecho.vapi \
/media/george/SharedData/Projects/Vala/CSharp2Vala/CSharp2Vala.vala \ -o /media/george/SharedData/Projects/Vala/CSharp2Vala/CSharp2Vala.exe
Loaded package `/usr/share/vala-0.36/vapi/glib-2.0.vapi'
Loaded package `/usr/share/vala-0.36/vapi/gobject-2.0.vapi'
Loaded package `/usr/share/vala-0.36/vapi/gio-2.0.vapi'
Loaded package `/usr/share/vala-0.36/vapi/libvala-0.36.vapi'
Loaded package `/usr/share/vala/vapi/gee-0.8.vapi'
cc -g -o '/media/george/SharedData/Projects/Vala/CSharp2Vala/CSharp2Vala.exe' '/media/george/SharedData/Projects/V
ala/CSharp2Vala/CSharp2Vala.c' -pthread -I/usr/include/vala-0.36 -I/usr/include/gee-0.8 -I/usr/include/glib-2.0 -I
/usr/lib/x86_64-linux-gnu/glib-2.0/include -lgio-2.0 -lvala-0.36 -lgee-0.8 -lgobject-2.0 -lglib-2.0 '-I/media/geor
ge/SharedData/Projects/Vala/vala-extra-vapis/' '-w' '-DGETTEXT_PACKAGE=...' '-I/media/george/SharedData/Projects/V
ala/CSharp2Vala/Echo-src/lib' '/media/george/SharedData/Projects/Vala/CSharp2Vala/Echo-src/lib/libecho.so'
Compilation succeeded - 3 warning(s)
使用--pkg libvala-0.36和--debug選項編譯CSharp2Vala.exe一直有效。用dbg顯示程序變量值不是問題。調試從libvala類沒有libvala符號類型變量的值是問題。 我試着用--- pkg libvala-0.36-0-dev和--- pkg libvala-0.36-0-dbg編譯,但是兩個文件都缺少.vapi文件。通過一週來試圖找到文檔或示例來展示如何使用這些軟件包進行編譯是徒勞的。 –