I'm developing in PHP and using Xdebug which i configured to turn file paths into vscode://file:/-links.
Until recently VSCode would simply open the file and jump to the specified line, but now it seems they have added an additional prompt in VSCode (as seen below) as a security measure.
The prompt reads: "An external application wants to open 'C:\path\file.php' in Code. Do you want to open this file or folder?'
I've searched the internet and the settings and settings.json for any option. How can i disable this prompt?
VSCode screenshot of the security prompt
I don't believe you can disable the confirmation prompt as of this writing. You can follow the feature request for updates.
Related
I'm using DDEV with Visual Studio Code and I tried to configure Live Server Extension to automatically auto reload page that I'm working on in Chrome when I hit save in VSC, but it doesn't seem to work with PHP.
Is there a way to configure this to work with DDEV?
I can't seam to find any info on this issue.
Thanks
I've managed to do it another way, with guard and guard-liveguard on linux.
The workflow was:
guard installation
guard-livereload installation
Installation was not quite straightforward, but you can follow the instructions in Terminal and install what's missing if it tells you so.
Guard placed Guardfile inside of /home/user directory so I edited it to contain only this, regarding livereload pard:
guard 'livereload' do
watch(%r{.+\.(css|scss|html|php|js)$})
end
Then I installed Liveguard Google Chrome Browser Extension from here:
http://livereload.com/extensions/
Under settings I had to enable "Allow access to file URLs".
Also, you have to press liveguard extension icon in Chrome in order for it to track changes.
That's about it, now when I edit any of the file types entered in Guardfile (you can edit and add what you need, of course) it automatically reloads my Chrome window whit the edited page opened.
I'm hoping to test WebRTC functionality in my web app. This requires accepting the browser's permission prompt for access to the Camera and/or Microphone. Is this possible to do with Casper.js and Slimer.js? I can't find anything in the documentation suggesting it's doable.
Somewhat related (similar problem, different platform): Accept browser permission dialog with behat/mink
While you can't programmatically click the permission button, CasperJS/SlimerJS will let you use a custom profile for the automated Firefox instance you're using in your tests. At least in the case of the WebRTC/getUserMedia permission prompts, Firefox lets you disable them in a profile's settings.
Here's what you do. In your shell, use SlimerJS to create a new profile:
slimerjs --createprofile nameOfYourNewProfileGoesHere
Your new profile has been created in your Firefox profiles directory. To locate the directory you can either search for the profile name you just created, or go to Firefox and Help Menu > Troubleshooting Information. Next to 'Profile Folder' click 'Show in Finder' (or equivalent for your platform).
Your profile is a directory with a name like asfd1234.nameOfYourNewProfileGoesHere, inside that dir edit the prefs.js file and add this line:
user_pref("media.navigator.permission.disabled", true);
Now when you run your CasperJS scripts (or SlimerJS directly, I suppose -- I only tested this through Casper), you just need to specify the profile. With CasperJS:
casperjs test --engine=slimerjs -P nameOfYourNewProfileGoesHere nameOfYourTestFile.js
It's almost too easy! ;)
LiveReload seems not to be working on sublime text 3 when I download it from the package control.
I found this link (https://github.com/dz0ny/LiveReload-sublimetext2/tree/devel) on github, but there's no info on how to do it on windows (I'm on W7). Is it possible, and if so, how can I do it?
Thanks!
After a lot of trial and error I've managed to get LiveReload working on Windows 8 + Sublime Text 3!
Get the files from the devel branch with the link.
Put those files in your Packages directory: C:\Users\[YOUR USER NAME]\AppData\Roaming\Sublime Text 3\Packages
Restart Sublime Text 3
Enable the 'Simple reload' plugin. You have to repeat this step every time you restart Sublime Text. To do this:
Open the command palette with Ctrl+Shift+P
Type LiveReload
When 'enable/disable plugins' is highlighted, hit Enter.
If you have the browser plugin installed, changes to your files should now immediately be shown upon save. You may also decided to insert the JS snippet, which you can do very easily through the command palette!
I've seen comments about Windows Firewall blocking the localhost with LiveReload. I haven't really had this issue, but I disabled the Firewall the first time, just to be sure. When I re-enabled it and restarted LiveReload, Windows Firewall showed a dialog asking me to refuse or allow the plugin to make connections. So now everything works fine even with the firewall up.
It's actually pretty simple.
The answer given by kslstn and NEKEY are right, but are missing a crucial step if you are working on a local project.
So, after installing LiveReload on sublime text and installing the chrome extension and enabling both of them, make sure, in the chrome extensions page, to enable access to file URLs.
You cannot use Package Control to install LiveReload for Sublime Text 3, it doesn't work correctly.
This method works though:
Navigate to https://github.com/dz0ny/LiveReload-sublimetext2/tree/devel and download the whole devel branch by clicking on "Download ZIP".
Extract contents of the archive to: "%APPDATA%\Sublime Text 3\Packages" and open that Packages folder.
Rename "LiveReload-sublimetext2-devel" folder to "LiveReload", this is an important step to make it work (name has to match).
Restart Sublime Text 3, Ctrl+Shift+P, "LiveReload: Enable/Disable Plugins", enable SimpleReload, ENJOY the amount of time saved by not switching to browser every time you change a line of code.
P.S. You do need to get the LiveReload Google Chrome plugin, just search for it on Google Chrome Extensions Web Store.
You have to download extension for your browser I've found these:
Safari : http://download.livereload.com/2.0.9/LiveReload-2.0.9.safariextz
Firefox : http://download.livereload.com/2.0.8/LiveReload-2.0.8.xpi
Chrome : https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei
More info Here https://sublime.wbond.net/packages/LiveReload.
If I understand it correctly, it works via Sockets, so you can't do anything without browser extension.
For some reason I cannot get this to work. I'm following the exact procedure described here
http://developer.chrome.com/extensions/external_extensions.html#registry
And I still cannot get the extension listed. If I install it manually, using "Add Unpacked Extension" it works just fine.
Any help would be greatly appreciated
One of many writeups on this subject:
Google on Friday announced that it is changing its stance for silently
installing extensions in its browser. As of Chrome 25, external
extension deployment options on Windows will be disabled by default
and all extensions previously installed using them will be
automatically disabled.
You're much better off submitting your extension to the Chrome Web Store. If you really want to install off-store, consider inline installation.
I have been struggling with installing an addon via the registry as well. I was successful with installing an addon without adding reg keys. And using the preferences file.
I extracted my extension to Local\Google\Chrome\User Data\Default\Extensions\${ADDONID}\${VERSION}
I then added my extension directly to the Preferences file in Local\Google\Chrome\User Data\Default under the section extensions settings ${ADDONID} <-- add your extension. Compare the Preferences file to an instance you have already installed your addon. And copy that to the Preferences file along with the extension directory on a fresh install. And it should work.
This thread gave me some direction:
https://superuser.com/questions/462804/how-to-copy-an-extension-from-one-chrome-installation-to-another
I am trying to debug Node.js (v0.6.1) with Google's Eclipse debugger plugin for V8. I'm using Eclipse v4.1.0 on Windows7. I followed the Using Eclipse as Node Applications Debugger, but whenever I try to attach to a running Node.js (port 5858) process, I get a pop-up error message saying:
An internal error occurred during: "Debug session initialization: Node-5858".
Exception occured in callback
Any suggestions ?
I have been looking into a problem similar to this, this is what I have found
The instructions for setting it up, might just be worth re-reading these to make sure everything is as it should be:
https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger
Do note that when looking around at a similar problem i located this help ticket on google code, it relates to a number of users who are having problems with Node.js on windows:
http://code.google.com/p/chromedevtools/issues/detail?id=53
It might be worth just downloading the newest version of Node.js as I believe this now has the fix in place, else download the fix file then mention within the ticket.
You can try to test for Nodeclipse version 0.2.0 beta.
http://www.tomotaro1065.com/nodeclipse/
GENERATING OF EXPRESS PROJECT
Select the [File]-[New]-[Project] menu.
Select [Node]-[Express Project], and push [Next] button.
Enter [Project name], and push [Finish] button.
DEBUGGING
Open the JavaScript source files that you want to set breakpoints.
Double-click on the ruler at the left end of the line you want to set a breakpoint.
If you want to remove a breakpoint, double-click on the ruler again.
Select the main source file of Node Application on the Project Explorer, open the context menu by right-clicking, select the [Debug As]-[Node Application] menu.
Just try this :
After creating the project, go to the cmd and provide the filepath of the file which you want to debug.
Now run the command node --debug-brk demo_node.js
(where demo_node.js is filename)
Now come to eclipse side, open the same file and set the break points.
Right click on the source file and select [Debug As]-[Node Application].