繁体   English   中英

VS Code 和 Julia - 无法通过 CTRL+F5 运行 Julia 应用程序

[英]VS Code and Julia - Unable to run Julia applications via CTRL+F5

我正在尝试让 Julia 扩展在 VS 代码中工作。 我可以通过 REPL 运行 Julia 个文件,并且可以在新进程中调试 Julia 个文件。 但是我无法在新进程中运行 Julia 个文件 换句话说,虽然所有其他运行选项都有效,但下图中带圆圈的选项无效。

在此处输入图像描述

这可能是什么原因?

我使用的是 Julia (1.7.3) 的最新稳定版本,VS 代码已完全更新。 我正在使用 Julia VS 代码扩展的 1.6.28 版。 我也在使用 Windows 10。当使用 CRTL+F5 时,我根本没有从 VS 代码得到任何反馈。 虽然计数器确实出现在“运行和调试”窗格中,但在我以另一种方式运行文件之前,运行时实例不会显示在调用堆栈中。 例如,如果我启动 VS 代码并使用“在新进程中运行文件”运行 Julia 文件,则运行和调试窗格如下所示:

在此处输入图像描述

如果我随后使用“新进程中的调试文件”再次运行相同的程序,“运行和调试”窗格将更新如下:

在此处输入图像描述

我注意到的唯一其他奇怪行为是加载 Julia 语言服务器时。 我在 Julia 语言服务器中得到以下 output:

[ Info: Starting the Julia Language Server
[ Info: Symbol server store is at 'c:\Users\Nick-PC\AppData\Roaming\Code\User\globalStorage\julialang.language-julia\symbolstorev5'.
[ Info: Starting LS at 1659719702
[ Info: Downloading caches...
┌ Info: Couldn't retrieve cache file for Dates.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/D/Dates_ade2ca70-3891-5945-98fb-dc099432e06a/vnothing_nothing.tar.gz
[ Info: Downloading caches... (4%)
┌ Info: Couldn't retrieve cache file for TOML.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/T/TOML_fa267f1f-6049-4f14-aa54-33bafae1ed76/vnothing_nothing.tar.gz
[ Info: Downloading caches... (8%)
┌ Info: Couldn't retrieve cache file for LibCURL.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/LibCURL_b27032c2-a3e7-50c8-80cd-2d36dbcbfd21/vnothing_nothing.tar.gz
[ Info: Downloading caches... (12%)
┌ Info: Couldn't retrieve cache file for Mmap.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/M/Mmap_a63ad114-7e13-5084-954f-fe012c677804/vnothing_nothing.tar.gz
[ Info: Downloading caches... (15%)
┌ Info: Couldn't retrieve cache file for Markdown.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/M/Markdown_d6f4376e-aef5-505a-96c1-9c027394607a/vnothing_nothing.tar.gz
[ Info: Downloading caches... (19%)
┌ Info: Couldn't retrieve cache file for LibGit2.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/LibGit2_76f85450-5226-5b5a-8eaa-529ad045b433/vnothing_nothing.tar.gz
[ Info: Downloading caches... (23%)
┌ Info: Couldn't retrieve cache file for Logging.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/Logging_56ddb016-857b-54e1-b83d-db4d58db5568/vnothing_nothing.tar.gz
[ Info: Downloading caches... (27%)
┌ Info: Couldn't retrieve cache file for Base64.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/B/Base64_2a0f44e3-6c83-55bd-87e4-b1978d98bd5f/vnothing_nothing.tar.gz
[ Info: Downloading caches... (31%)
┌ Info: Couldn't retrieve cache file for REPL.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/R/REPL_3fa0cd96-eef1-5676-8a61-b3b8758bbffb/vnothing_nothing.tar.gz
[ Info: Downloading caches... (35%)
┌ Info: Couldn't retrieve cache file for Downloads.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/D/Downloads_f43a241f-c20a-4ad4-852c-f6b1247861c6/vnothing_nothing.tar.gz
[ Info: Downloading caches... (38%)
┌ Info: Couldn't retrieve cache file for ArgTools.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/A/ArgTools_0dad84c5-d112-42e6-8d28-ef12dabb789f/vnothing_nothing.tar.gz
[ Info: Downloading caches... (42%)
┌ Info: Couldn't retrieve cache file for Random.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/R/Random_9a3f8284-a2c9-5f02-9a11-845980a1fd5c/vnothing_nothing.tar.gz
[ Info: Downloading caches... (46%)
┌ Info: Couldn't retrieve cache file for UUIDs.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/U/UUIDs_cf7118a7-6976-5b1a-9a39-7adc72f591a4/vnothing_nothing.tar.gz
[ Info: Downloading caches... (50%)
┌ Info: Couldn't retrieve cache file for Artifacts.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/A/Artifacts_56f22d72-fd6d-98f1-02f0-08ddc0907c33/vnothing_nothing.tar.gz
[ Info: Downloading caches... (54%)
┌ Info: Couldn't retrieve cache file for Unicode.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/U/Unicode_4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5/vnothing_nothing.tar.gz
[ Info: Downloading caches... (58%)
┌ Info: Couldn't retrieve cache file for Pkg.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/P/Pkg_44cfe95a-1eb2-52ea-b672-e2afdf69b78f/vnothing_nothing.tar.gz
[ Info: Downloading caches... (62%)
┌ Info: Couldn't retrieve cache file for InteractiveUtils.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/I/InteractiveUtils_b77e0a4c-d291-57a0-90e8-8db25a27a240/vnothing_nothing.tar.gz
[ Info: Downloading caches... (65%)
┌ Info: Couldn't retrieve cache file for Sockets.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/S/Sockets_6462fe0b-24de-5631-8697-dd941f90decc/vnothing_nothing.tar.gz
[ Info: Downloading caches... (69%)
┌ Info: Couldn't retrieve cache file for Serialization.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/S/Serialization_9e88b42a-f829-5b0c-bbe9-9e923198166b/vnothing_nothing.tar.gz
[ Info: Downloading caches... (73%)
┌ Info: Couldn't retrieve cache file for Tar.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/T/Tar_a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e/vnothing_nothing.tar.gz
[ Info: Downloading caches... (77%)
┌ Info: Couldn't retrieve cache file for NetworkOptions.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/N/NetworkOptions_ca575930-c2e3-43a9-ace4-1e988b2c1908/vnothing_nothing.tar.gz
[ Info: Downloading caches... (81%)
┌ Info: Couldn't retrieve cache file for Test.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/T/Test_8dfed614-e22c-5e08-85e1-65c5234f0b40/vnothing_nothing.tar.gz
[ Info: Downloading caches... (85%)
┌ Info: Couldn't retrieve cache file for Printf.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/P/Printf_de0858da-6303-5e67-8744-51eddeeeb8d7/vnothing_nothing.tar.gz
[ Info: Downloading caches... (88%)
┌ Info: Couldn't retrieve cache file for SHA.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/S/SHA_ea8e919c-243c-51af-8825-aaa63cd721ce/vnothing_nothing.tar.gz
[ Info: Downloading caches... (92%)
┌ Info: Couldn't retrieve cache file for Libdl.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/L/Libdl_8f399da3-3557-5675-b5ff-fb832c97cbdb/vnothing_nothing.tar.gz
[ Info: Downloading caches... (96%)
┌ Info: Couldn't retrieve cache file for FileWatching.
└   exception = HTTP/1.1 404 Not Found while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/F/FileWatching_7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee/vnothing_nothing.tar.gz
[ Info: All cache files downloaded. (100%)
[ Info: Loading IJulia from cache... (0%)
┌ Warning: Pkg not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: Test not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: Random not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: Libdl not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: UUIDs not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
[ Info: Loading SoftGlobalScope from cache... (0%)
┌ Warning: REPL not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
[ Info: Loading Conda from cache... (0%)
┌ Warning: Downloads not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
[ Info: Loading JSON from cache... (0%)
┌ Warning: Dates not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
[ Info: Loading Parsers from cache... (0%)
┌ Warning: Mmap not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: Unicode not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
[ Info: Loading VersionParsing from cache... (0%)
[ Info: Loading ZMQ from cache... (0%)
┌ Warning: Sockets not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: FileWatching not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: ZeroMQ_jll not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: Base64 not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
[ Info: Loading MbedTLS from cache... (0%)
┌ Warning: MbedTLS_jll not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: MozillaCACerts_jll not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: InteractiveUtils not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: Printf not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
┌ Warning: Markdown not stored on disc
└ @ SymbolServer c:\Users\Nick-PC\.vscode\extensions\julialang.language-julia-1.6.28\scripts\packages\SymbolServer\src\SymbolServer.jl:247
[ Info: Received new data from Julia Symbol Server.

使用“新进程中的调试文件”后,我还在“任务”中得到以下 output:

Error: there is no registered task type 'julia-proc'. Did you miss installing an extension that provides a corresponding task provider?

如果改用其他两个运行命令之一,我不会在“任务”中得到相同的 output。

显示我的输出选项卡

我确实得到了相同的 output 提示,但与您不同的是,我可以在新进程中运行文件。 也许您的问题出在其他地方。

我也遇到了这个问题。 我通过打开一个新的 bash 终端选项卡,运行import Pkg; 然后在 julia REPL 中添加Pkg.add("DynamicalSystems") ,并将 VS Code 中的配置添加到“运行活动 Julia 文件”。 我相信您需要为您尝试运行的特定文件的所有依赖项运行Pkg.add(<insert package name in quotes>)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM