visual-studio-code

VSCode cannot find python (Anaconda install)

爱⌒轻易说出口 提交于 2021-02-08 05:24:13
问题 I have just installed anaconda3 5.2.0 with vscode 1.27.2 on windows10 (actually, removed and reinstalled) and am trying to execute the simplest python code on terminal. However, I get the following errors... jac@p50:/mnt/c/Users/jac/Documents/dev/python/JupyterNotebooks/Learn/Pandas Learn$activate base /mnt/c/Users/jac/Anaconda3/Scripts/activate: 2: /mnt/c/Users/jac/Anaconda3/Scripts/activate: cygpath: not found /mnt/c/Users/jac/Anaconda3/Scripts/activate: 3: .: Can't open /etc/profile.d

global keyword in python

本小妞迷上赌 提交于 2021-02-08 04:51:13
问题 I'm studying python, and getting struggle with the global keyword within vscode . So far the code is working, but the vscode linter is raising an error, and I would like to understand why I've tried using the global keyword, and the code works fine even though I got a linter error. I try using a local variable and didn't get any error def whatIs (): global myvalue myvalue +=10 print("myvalue: {}".format(myvalue)) myvalue=10 whatIs() print("myvalue: {}".format(myvalue)) The linter points to

How to call other extensions in a extension on vscode

这一生的挚爱 提交于 2021-02-08 04:48:51
问题 Here is my demand, I want to startup a debug session with some dynamic arguments. So I need to develop a extension that collect the arguments at first and register a debugger wrapper to vscode, after that I have to find a way to call the target extension's debugger with my arguments. vscode.extensions.getExtension can get extension's informations and be able to active it only. I found a command named "debug.startFromConfig" in vscode's sources, so I can use vscode.commands.executeCommand to

How to call other extensions in a extension on vscode

天大地大妈咪最大 提交于 2021-02-08 04:47:07
问题 Here is my demand, I want to startup a debug session with some dynamic arguments. So I need to develop a extension that collect the arguments at first and register a debugger wrapper to vscode, after that I have to find a way to call the target extension's debugger with my arguments. vscode.extensions.getExtension can get extension's informations and be able to active it only. I found a command named "debug.startFromConfig" in vscode's sources, so I can use vscode.commands.executeCommand to

React Native in VS Code: add configuration for iOS Device to launch.json

霸气de小男生 提交于 2021-02-08 03:05:27
问题 I have a React Native project open in Visual Studio code, and Im trying to run the project on a physical connected iOS device. I successfully ran the app on the device directly from Xcode, but from Visual Studio Code I'm having issues. I believe I need to add a configuration for the device into launch.json. I have tried different entries in there but non seem to work. What is the proper way to add a configuration for a connected iOS device? 回答1: Try with react-native run-ios --device "your

How to exclude all but certain files in the sidebar in Visual Studio Code?

可紊 提交于 2021-02-08 01:50:32
问题 Using Microsoft's Visual Studio Code, how do I show only certain files and file patterns in the sidebar and exclude all other files? I want to show .yml files to achieve editing only them and not to scroll through all files. I tried this, but it didn't work. "files.exclude": { "**/*": true, "**/*.yml": false } P.S. I understand there is a way to hide certain files, but I want to show only specific files. I don't mind using an extension to achieve this. 回答1: This will get you pretty close:

Haskero fails with “Not a valid Unicode code point!”

浪子不回头ぞ 提交于 2021-02-07 21:29:09
问题 I'm trying to run Haskero to do Haskell editing with VSCode. However, it's failing on initialization, with the following error: Initializing Haskero... Spawning process 'stack' with command 'stack ghci --with-ghc intero "--ghci-options=-ignore-dot-ghci -Wall" --no-build --no-load' (node:3726) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: reason.indexOf is not a function (node:3726) DeprecationWarning: Unhandled promise rejections are deprecated.

ReferenceError: $ is not defined when debug

我的未来我决定 提交于 2021-02-07 20:48:51
问题 I have this error message ReferenceError: $ is not defined when using vscode built-in debugger node.js Here is the html <!doctype html> <html lang="en"> <head> <title>14. Getting Started with jQuery</title> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> </head> <body> <script type="text/javascript" src="js/app.js"></script> </body> </html> Here is the app.js $(function() { // start up code goes here alert("this works!"); }); I put a

ReferenceError: $ is not defined when debug

自闭症网瘾萝莉.ら 提交于 2021-02-07 20:48:37
问题 I have this error message ReferenceError: $ is not defined when using vscode built-in debugger node.js Here is the html <!doctype html> <html lang="en"> <head> <title>14. Getting Started with jQuery</title> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> </head> <body> <script type="text/javascript" src="js/app.js"></script> </body> </html> Here is the app.js $(function() { // start up code goes here alert("this works!"); }); I put a

Visual Studio Code - C# Console Application

烂漫一生 提交于 2021-02-07 18:47:53
问题 Possibly a repeat or very basic question... I have recently downloaded Visual Studio Code on Windows and tried to open my existing "Hello World!!" console application. I have downloaded the C# extension for the same. Could you please point me to documentation where I can find step-by-step guide for configuring VS Code so that I can open existing console app and debug/ run the same. Currently when I opened my existing C# project written using VS2013 and tried to debug/ run, it is not working.