Visual Studio Code debug mode issue - visual-studio-code

I'm sorry to bother , I don't know if I can ask this
Visual Studio Code, suddenly can't use debug mode to set interrupts to test.
It seems that it is talking about the folder name problem, but after accessing the folder, it will not be renamed. How can I solve it now? I can't upload photos so I'm capturing the important parts.
i.e.: the module "queue" could not be imported because it is shadowed by:
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/queue/__init__.pyc
Please rename this file/folder so that the original module from the standard library can be imported.
Not sure how to change folder name or duplicate name, these actions are forbidden after accessing the folder, or is this some other problem?

This looks like an actual issue in VSCode - https://github.com/microsoft/debugpy/issues/886
In case you're using python 2.7, Downgrading the python VSCode extension should help.

Related

custom vscode extension not working over ssh

I created a vscode extension for the first time..I used LSP(language server protocol) and having both client and server bundled as one extension.
The extension has highlighting and autocomplete features for a custom file type. I packaged it using vsce I got a VSIX file. I installed the extension in my vscode using the .vsix file.
The extension works when i am working on local files.
However, i connected to a remote VM using the ms-vscode-remote.remote-ssh extension such that I can view the remote files in vscode, but here my created extension is not working. I can't even see the file type i created.
Any help is appreciated. Is there some specific setting I need to put in my package.json
For your extension to properly work remotely, either installed on host or on the remote, you have to follow a few guidelines, and yes, there are some settings that you may take care of on package.json.
The first and more complete source of information is Supporting Remote Development and GitHub Codespaces API documentation. It describes the architecture, settings, how to debug, common problems and so on. There is also the Extension Host page, where it describes the Preferred extension location topic, which tells you how to configure your extension to work on the correct location.
Based on your description (a LSP related extension) I understand your extension should be a Workspace Extension. This means that you should have this on your package.json:
"extensionKind": [
"workspace"
]
The Commons Problem section describes how you can evaluate and fix Incorrect execution location. To debug using SSH follow these instructions.
Also, remember that while working with remotes, you rely on local paths anymore. Instead you must always deal with Uri, whenever possible.
I guess after reviewing your settings, based on the docs related above, you should be able to detect what is happening on your extension and fix it. Give debug a try, it will be much easier to detect issues than installing the vsix and look for erros in Console.
Hope this helps

Simulating Virtual Directory type of folder

I looked up to see if some post already had the answer but I have a situation in VSCode that is easy to resolve in Visual Studio but here I don't know how to do it.
I have a project that runs in a virtual director of other Site.
Lets say I run http://example.com and than in the iis I have a Virtual Directory named "Tests" that holds my project. So in production env I type http://example.com/Tests and I can see my site and all the relative paths that I have (on assets mainly) work.
The thing is that I want to stop using Visual Studio and start using VSCODE and I don t know how to configure the project so when I ask for asset with the relative path "/Tests/main.css" the right file is served (because of the folder Tests not really existing).
I installed iisexpress in vscode and tried to configure it but with no luck.
Sorry for possibly the bad explanation.
Thanks for your time and help.

'${workspaceFolder}' can not be resolved. Please open a folder.' on Visual Studio Code

wondering if you could assist. Really challenging in determining a solution to this from my research.
Ive downloaded Visual Studio code two weeks ago and has come across an error once I try to debug a file. The file appears to open but once I run the debugger it shows accordingly:
'${workspaceFolder}' can not be resolved. Please open a folder.
Can't seem to find or replicate a similar solution. I've also tried to reinstall Visual Studio code (no easy feat). I'm trying to at least understand the problem and its source.
The file is a .js file that I've been working on, running a simple function. It is not meant to operate in tandem with a larger workspace/program.
In VScode go to file --> Add folder to workspace and select the folder where the program files are located.
If you are using the latest Visual Studio 1.44, make sure to upgrade to 1.44.2.
The issue microsoft/vscode issue 94725 has been resolved.
It featured the same error message:
After some investigation the problem is the following for the workspace configuration our debug extensions appends the following attribute
__workspaceFolder:'${workspaceFolder}'
And the configuration resolver properly tries to resolve this and complains because the scope of the folder is not specified.
In a multi root workspace scope has to be specified, otherwise the resolver does not know against which folder to resolve the variables.
Proposed fix: the node extension which adds this attribute should scope it if it sees that we are in a multi root folder.
So instead of ${workspaceFolder} use ${FOLDER_NAME:workspaceFolder}.
This is fixed in commit ae97613.
Replace ${workspaceFolder} with ${FOLDER_NAME:workspaceFolder} in your *.code-workspace file. (from [here][1])
By the way, same goes to ${workspaceRoot}, you can replace it with ${FOLDER_NAME:workspaceRoot}.
Any more folder variables ca be fixed with this FOLDER_NAME: prefix? My workspaces did not use them so far.
Worked for me in Version: 1.44.2.
I know this question is very old already and the answers may have been correct but none worked for me on vscode v1.57.1 at the time of this comment on 30.06.2021
I had to replace ${workspaceFolder} with ${workspaceFolder:my-folder-name} in my *.code-workspace file
Ref: Variables scoped per workspace folder
I recently had this problem and so did I read the answers above but being a beginner I was unable to solve it .In my answer I don't have exactly what you should do but I will show what worked for me.
Go to the explorer and you will see there is no folder added.
Browse for .vscode folder and select it.
Issue solved {this atleast worked for me.It**(.vscode)** had .json extension file in it}.
I was having the same issue, but I solved it this way:
1- open VS Code as administrator
2- open the sheet
3- debugging with no problem :)
enter image description here
I just create a file.json that they can debug.

Ajax Controls Toolkit and Ajaxmin

I am learning how to use the Ajax Control Toolkit using VB.NET in code-behind in Visual Studio 10.0.40219.1 SP1Rel, .NET 4.0.30319 SP1Rel. I have been to many websites and tried lots of code, using the AnimationExtender. The sample that came with the toolkit works perfectly, but on
http://localhost:1049/
which is different from my "view code in browser" url:
http://localhost:4258/
When I change the url to mine, I get this error:
Could not load file or assembly 'AjaxMin, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies. The system cannot find the file specified.
Nothing in the installation instructions mentions this. I can't run the page I'm using to learn how to use the AnimationExtender. I am at a loss, and I can't find anything like this on Google or here.
Thanks!
Matty's suggestion to check the sample project sent me back to the directory where I'd unzipped it, then checked the file AjaxControlToolkit.Binary.NET40.zip, which had the AjaxMin.dll file in it. I had admin move the file to C:\Program Files\Microsoft Visual Studio 10.0\VB\Bin (I don't know if that directory matters, it works for me), then in VS added the DLL as a reference to the project. The few errors I've gotten since are nothing to do with ajaxmin.
I had the same problem, I had to copy the file AjaxMin.dll from where I extracted the AjaxControlToolkit.Binary.NET40.zip, to my project's bin folder. i.e. C:\Users\MyUserName\Documents\Visual Studio 2010\Projects\MyProject\MyProject\bin
Rebuilt the solution and this time worked fine..
Hope that will help you :)

How to avoid necessity of writable .vbg in Visual Studio 6?

I have a Project Group in Visual Studio 6 (.vbg). The projects are under source control (TFS). When I start debugging Visual studio there is an error Path/file access error: Path/name.vbg and dialog for "Save Project Group As" follows when canceled debugging runs without problems. To circumvent this annoyance I need to have the group file checked out or mark as readable just by file attribute. Is there a way how to avoid this behavior?
Notes: Situation was the same when Visual Source Safe was used. By my observation .vbg is not changed when the change is allowed. The problem can be connected with using English Windows with non English regional settings.
No. Just keep the VBG in version control, and make the files read-write in your local directory.
The easiest solution would be for you to save your VBG files to a folder outside of source control. It won't make a difference to the running directory - that is based on the EXE project (if any).