简体   繁体   English

Go to definition in VS code 不显示函数体

[英]Go to definition in VS code doesn't show the body of a function

When I right click on a function and then select "Go to definition" there shows up a module with that function, but it only shows the parameters which have to be passed to it, and I can't see anything about the body of the function.当我右键单击一个函数然后选择“转到定义”时,会显示一个带有该函数的模块,但它只显示必须传递给它的参数,而我看不到任何关于功能。

Here is what's shown when I went to the definition of itertools.dropwhile :这是我转到itertools.dropwhile的定义时显示的内容:

转到定义

正如评论中提到的,VSCode 只能向您显示它可以访问的源代码,并且许多 Python 内置函数和 stdlib(包括itertools模块)是在编译后的 C 中实现的——没有源代码可以向您展示。

暂无
暂无

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

相关问题 “转到定义”选项在 Visual Studio Code 中不起作用 - “Go to definition” option doesn't work in Visual Studio Code 转到 VS Code 中本地 python 包的定义 - Go to definition for local python packages in VS Code 遇到关于在 github 代表中导航代码的基本问题,因为单击函数引用不会突出显示它或显示定义 - Running into a basic issue about navigating code in github rep as clicking on a function-reference doesn't hightlight it or show definition VS 代码在“转到定义”工作时显示 pylint 导入错误 - VS code shows pylint import errors while 'go to definition' works VS Code Python“自动完成”和“转到定义”,GAE无法正常工作 - VS Code Python 'autocompletion' and 'go to definition' for GAE not working 当 function 主体中的多行字符串时,无法在 VS Code 中生成带有 autoDocstring 扩展名的 Python 文档字符串 - Can't generate Python docstring with autoDocstring extension in VS Code when multiline string in the function body str() 在我的函数体中不起作用 - str() doesn't work in the body of my function 如何修改此代码,使它不返回到函数的开头,而是返回到函数的开头? - How can I modify this code so it doesn't go back to the beginning of the function, but a little bit after the beginning? 放入 main() 定义时代码不起作用 - Code doesn't work while put in main() definition VS Code 无法识别 pep8 - VS Code doesn't recognize pep8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM