I am using the "C4 DSL Extension" of VSCode to show previews of my architecture diagrams. The previews are rendered through the WebviewPanel. The source code can be found here: https://gitlab.com/systemticks/c4-grammar/-/blob/master/extension/src/c4-structurizr-preview.ts
It works through a direct connection, but once connected with my corporate network, all requests have to pass through a proxy. VSCode itself handles proxies through the http_proxy and https_proxy variables. However, the WebviewPanel does not seem to take those settings.
The following figure shows an excerpt of the console. You can see, that the request to query the "structurizr-embed.js" failed.
Is this behavior intended? I could not find a setting in VSCode to enable WebviewPanel to request via proxy.
Note: I am using the Linux version of VSCode.
I found a solution by setting the http.proxy variable in VSCode. We are using authentication for proxies and previously I exported the http_proxy environment variable in the form of http_proxy=http://<username>:<password>#<host>:<port>.
However, VSCode expects this variable without credentials: http_proxy=http://<host>:<port>. Now I don't understand where it talks the credentials from, but it works.
Related
Introduction
Honestry,I'm not native English user,so my English is not better.
If you have any question, ask me by comment.
what I wanna do
As a premise,when you try to access local files by web site link,IE or FireFox can access( by simple setting) ,but Chrome can't access for their security poricy.
I found the ways to do this, like below:
add --allow-file-access-from-files option when you execute chrome.exe
build a local server like nginx or Apache HTTP Server,which meditate to access local data
Use chrome extentionEnable local file links
Due to business restrictions,I should resolve this problem by method 1. but I can't enable loacl data link though I set option correctly.
I googled why I can't,but I couldn't find why it won't work.
(In the first place,I can't even find Google official description of --allow-file-access-from-files.How predecessors find that method ... )
While searching、I found person who have the same question、Google Forum.
I'm convinced that this is not my simple miss,but more deep problem,so I decided to make this question.
what I tried
I rebooted computer,killed all process related to chrome,then change directory where contains chrome executable file,and execute chrome.exe --allow-file-access-from-files
I rebooted computer,killed all process related to chrome 、create shortcut on my Desktop ,which destination is "/path/to/chrome/chrome.exe"--allow-file-access-from-files
After execute chrome,I checked chrome boot option to accesschrome://version/.Both method, I could boot chrome by add --allow-file-access-from-files option,but can't achieve first purpose to access local file access.
what I wanna know
lacking or similar to --allow-file-access-from-filesoption、
(solution similar to method 2 or method 3,like "Give up option solution,and use nginx as local server" is unnecessary)
or other solution
Additionary,if you know below info,please teach me.
- Google official documentation which descriptionsallow-file-access-from-files
( Indended to Oracle official Javadoc of Java.)
Using Tool
Chrome Version : 78.0.3904.87
OS : WIndows 7 SP1
I tried out your new feature "xedbug on demand". I stuck to these guides (https://www.jetbrains.com/help/phpstorm/2016.3/configuring-xdebug.html and https://blog.jetbrains.com/phpstorm/2016/06/xdebug-on-demand-for-cli-php-scripts-in-phpstorm-2016-2-eap/).
I see that in the php Server menu when I add the path to the xdebug that PhpStorm recognizes it (the label switches from "not installed" to "XDebugger 2.4.1").
So everything seems to be fine but when I use the debugger via the bug-icon, it never attaches/stops for the breakpoint.
I activated the xdebug-Logfile, but it stays completely empty.
Furthermore I commented everything xdebug-related out in the php.ini.
The xdebug-port is still on 9000 (default).
Any ideas what I can do about it?
Update: I'm using the debugger via phpStorm's "PHP Web Application" and the debug-icon. I'm debugging php files which are executed via an apache vHost.
PS: Checked IntelliJ forum and Stack posts, didn't find anything helpful though...
"Xdebug in demand" option works for CLI debugging only (Run/Debug Configuration of "PHP Script" type; will also work for other CLI-mode configs, e.g. "PHPUnit") be it local or remote.
Quote from the aforementioned introduction blog post:
To use the great new feature, first, you need to disable Xdebug for command line PHP scripts.
That option does not work for web pages served via web browser (e.g. Apache/nginx/IIS) or when just listening for any incoming debug connections (Zero-config approach) where actual debug is initiated outside of IDE.
The reason is very simple: when launching debugger for CLI script, IDE launches your php executable (your configured PHP Interpreter, e.g. php.exe on Windows) with additional parameter (-z: check php --help output or here) that can load such additional extension.
But when you debugging a web page then whole PHP is not controlled by PhpStorm: it's your web server (Apache/nginx/IIS/etc) that communicates with PHP .. and you cannot pass such arguments at this stage.
Is there a way in VS 2015 to start browser-link debug session with specific command-line options on Chrome like “--unsafely-treat-insecure-origin-as-secure=http://example.com". My objective is to debug a domain & subdomain "combo" in an insecure (http://) environment but Google now limits “powerful feature” to secure environments (https://) and this is one of their preferred workarounds. See more HERE. I know that I can probably start a manual instance of Chrome to the debug server:port but it would be nicer if it were integrated. I've text-searched the entire project for "chrome.exe" as a start but nothing was there.
I’ve tried to set up a domain & subdomain with SSL and I’ve failed miserably, so this is a (hopefully) a workaround for now. :-)
Edit2: Additional info: I use a machine-name:port setup along with a subdomain embedded in an iframe. Ex: http://MyMachine:50080 and the iFrame is at 192.168.48.116.
I'm using Chrome in a Docker container (published by SeleniumHQ) to run automated tests in the Cloud. This runs a minimal display environment on XVFB that you can VNC into to see results.
Now we're using this within a Corporate firewall - and so external requests need to go through a proxy. We're setting the proxy with the Selenium proxy command.
Now we've run a test on the command line with curl on the Chrome docker container and curl with the proxy can access external resources just fine. But Chrome has an unknown problem accessing external resources (internal are fine). When we try and look at the settings, it is locked out. (Something about not being about the render the settings on xvfb).
So I'm looking for a way to look at the settings similar to Firefox's about:config. Now obviously this doesn't work on Chrome, but there appear to be some similar things.
There appear to be some details on URLs to use here.
They suggest:
chrome://net-internals/proxyservice#events
chrome://net-internals/proxyservice.config#events
chrome://net-internals/proxyservice.init_log#events
chrome://net-internals/proxyservice.bad_proxies#events
My question is: How to view Chrome settings on XVFB?
One way to see the current preferences is to open the file scoped_dir5752_14079\Default\Preferences in the temporary folder once the session is started.
And for a list and description of the preferences :
https://chromium.googlesource.com/chromium/src/+/master/chrome/common/pref_names.cc
I have just installed Vault on my machine, I intend touse it single user.
When trying to use it for the first time, I get the error message below.
Is there anything I should enable?
I have the correct passwords.
I am using the Admin account.
I have Windows * 64 bits, Vault is also 64 bits.
Thanks to Beth's answer below, now I can at least visualise the following page, but still not be able to follow the links in it.
This is the result I get when I click on the links(Picture below).
Error messages are below, but the formatting is not good.
Most likely causes: The request matched a wildcard mime map.
The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.
Things you can try: If you want to serve this content as a static file, add an explicit MIME map.
Detailed Error Information: Module StaticFileModule Notification ExecuteRequestHandler Handler StaticFile Error Code 0x80070032
Requested URL http://vrindavana:80/VaultService/Admin/default.aspx Physical Path C:\inetpub\wwwroot\VaultService\Admin\default.aspx
Logon Method Anonymous
Logon User Anonymous
IIS:
I have IIS installed and if I browse it I see what's on the picture below.
First try reaching the Vault server using a browser. Try the URL http://<your Vault server name>/vaultservice/index.html. If you can not reach that page, then change to either the FQDN or the IP address.
If you still cannot reach the index.html page, then try reaching it using a browser right on the server and use localhost. The URL would then be http://localhost/vaultservice/index.html.
Let me know the results of these URLs first and then I'll give you next steps.
Beth
SourceGear Technical Support
Thanks for the update.
The error seems to indicate a problem with the .NET Framework. Here are the next steps you should try.
1) Register the .NET framework with IIS. Run a command-prompt as administrator and then change directories until you get to the highest version of the 4.x .NET framework. It might look something like cd C:\Windows\Microsoft.net\framework64\v4.0.30319, but I'm not sure of the entire path on your machine. Then run the command aspnet_regiis -i.
Then try your web page again.
2) If you then get a 404.2 error, then open your IIS Manager, click on the machine name and then click on ISAPI and CGI restrictions. Make sure the .NET frameworks are set to Allow there.