Visual Studio 2010 File Open - Say its already open! - javascript

I have a solution which has 20 projects. One of them is a website project.
When I try to open a js file in the website project for the first time, it opens fine.
But when I try to open any of those js files, it gives me this error:
---------------------------
Microsoft Visual Studio
---------------------------
The document 'X:\\....path.js' is already open. Do you want to close it?
---------------------------
Yes No
---------------------------
I tried to search on forums, internet, MSDN and everywhere, its quiet annoying.
Any help would be greatly appreciated.
Thanks

I only have some tips:
You can use the handle utility of sysinternals.com to find out if and which process is holding the file open. This utility can also close such a handle with violence.
I guess that X: is a network drive. Is it possible that this file is actually opened from a different computer? It might be in use i.e by a Web-test server?
Did you try to open this very file with a different program (i.e. notepad) on the same machine, when the project is loaded in VS?

The error message is shown when the same file is open in the same VS instance, but with another editor (you'll see it e.g. when opening a resource file in the code editor when it is already open in the resource file editor). Did you open the file in both cases by double-clicking? Try to play around with the Open With command, which allows you to select the VS editor.
The error message is not related to another application holding the file open.
What happens when you confirm closing it? Do you have any Visual Studio extensions or add-ins installed? Try disabling all of them.

I had this issue with a TypeScript file in VS2013 Premium.
Restarting VS and then the machine didn't prevent the issue. Opening VS in Safemode didn't help. The only solution I found was position my mouse over the 'X' on the document the message box was complaining about (much easier with a trackball than a mouse) and open the solution with the keyboard, ensuring the pointer was in the right place to close the document as soon as it rendered and before the message box was shown.
UPDATE: A simpler fix is to delete the .suo file. That lets you open the solution with no open files.

Related

Chrome dev tools opens an old file when I try to debug?

I'm trying to debug a javascript file, but whenever I use the Chrome Devtools, a random old JS file opens instead. I haven't been able to move on with my project because of this. Does anybody know why it won't read the current file? You can see down on the gif that I am using index.js but every time I debug it opens a random file and reads that instead.
GIF OF THE ERROR
It could be a problem with caching. Try using a silent browser and disabling caching
enter image description here
The browser caches your old JS file. So what you can do on Chrome is perform a hard refresh with CTRL + Shift + R while the dev tool is open.
If your project uses webpack. Make sure you keep it running. The VScode extension LiveServer will take changes but will only work with the JS file you had the last time you ran it.

How to enable the download window prompt for javascript-based Selenium-webdriver?

I am using 'selenium-webdriver' npm package to simulate an endpoint user - I click on buttons, select drop-downs and checkboxes.
I come across an image that will help me download a PDF file.
So what I want and what happens when I manually click on this image button on a regular chrome tab is that it will prompt a save-window:
What actually happens is that the file is downloaded automatically in the default directory (which is 'download' folder for me), without showing the save-window prompt. If the same file is already present in the download folder, then the new file gets a suffix of "(2)" or a corresponding number to its name.
I generally use this basic Selenium documentation: https://www.selenium.dev/documentation/en/getting_started_with_webdriver/browsers/
2nd reference I use is: Selenium-javascript-docs
Most of the Selenium question-answers are in the java language, so those don't help me as I'm using the javascript package.
I do know it has to do with the chrome options, or a chrome-specific field, but the document is just lacking. I came across the chrome-driver doc, but it is not javascript-friendly.
Other than disabling the automatic-download feature, I am also interested in changing the download directory to a custom location.
Any help or reference/guide/documentation source is greatly appreciated. Thank you in advance and thank you for reading.
You can use setDownloadPath to modify the path where the file will be downloaded.
Other than that, I don't think there's an option to prevent the automatic download

How to add Mozilla ActiveX Control v1.7.12 to my vb.net windows form project

I downloaded the mozillacontrol1712.exe file and installed it. It created a new folder in the Program Files (x86) folder...Mozilla ActiveX v1.7.12, containing 14 folders and 169 files. All of the posts said you must register to make it work. I successfully registered the mozctlx.dll file. The tool box shows Mozilla Browser Class. When I try to drag the "control" on to the form it shows a small square and then Visual studio shuts down and starts over with a new blank form. What am I doing wrong? If there is a tutorial out there that would help me get started it would be very nice.
Having had similar problems, may I suggest looking closely at DEP and ensuring all parts of the DLL are excluded?
To research:
https://learn.microsoft.com/en-us/windows/win32/memory/data-execution-prevention
To configure:
https://www.online-tech-tips.com/windows-xp/disable-turn-off-dep-windows/

Upload a file using Selenium IDE 2.9.1

Am not able to upload a file using IDE.
The application consists of a NEW FILE button, after clicking on it, it opens Windows Popup for the file in the local machine .Once the file is found in the local, it needs to be uploaded.
Please help.
The problem is manipulating the dialog window ?
You can always make use of other (free) automating tools. I recommend using AutoIt. It's free, very straight forward.

Live Editing Remote JavaScript in Chrome Inspector

I'm trying to debug remote javaScript using Google Chrome inspector. I recall in the past being able to:
1) Edit remote javascript using Chrome Inspector
2) 'Save' the change using (cmd + s)
3) Test the effect the the altered javaScript on the page
Now when I try to 'save' the change I get a yellow warning icon in the 'tab' that says
"Changes to this file were not saved to the file system"
Can anyone help me with this, please bear in mind that I'm working with remote code (not trying to alter local files) and I do have the developer tools extension installed.
The changes were not saved to disk because you obviously can't access the remote js file, but they will take effect when javascript will reach to these lines of code.
You can add a breakpoint before the place you want to dynamically add your code, reload the page, add the code you want, click ctrl-s. Ignore the warning you mention about the file system and enjoy.
So you can follow these steps and just ignore the warning.
For anyone who stumbles across this, as I did...
For Local Files
You may need to run chrome as Administrator. Or in my case (Ubuntu) as root user.
sudo google-chrome --no-sandbox
Then you can save the files within devtools.
UPDATE: Per the link below, the docs have moved here.
You have to have Workspaces set up in order to do this. Read the docs on how to use Workspaces: https://developer.chrome.com/devtools/docs/workspaces

Categories

Resources