I found many projects that required a server. My question how do I start Visual Studio Code like any other jQuery/React/Angular library? How do I start it from the browser without using a server?
I know that I will need to provide the files using a script.
I don't need the extension marketplace, terminal and similar. I only need the files tab on the left, the search tab, and the editor itself. The editor is Monaco, I found out. But I didn't find something that also contains the files panel and the tabs switcher (The list of opened files).
There are projects like code-server, but it requires a server. It also should be executed by our clients, so I don't want resources or security risks on the server.
So how do I compile and embed Visual Studio Code into a Web page to be served by a static HTML server?
Related
Is there a way to replace a .js file in the website sources with a file on my workstation, or make a modification to a .js file and refresh the website to see the changes?
I am developing client-side JavaScript code against a SharePoint website on a server. I cannot create a local version of the website, so I need to modify the script, save the file to the server, refresh, etc. I do not have direct access to the server, and saving a file in a SP doc library or web part takes a lot of time between edits.
I can make small modifications using the dev tools while breaking on certain lines and applying snippets, but I am hoping for a better way.
Thanks!
If you have access the server that's hosting the file you should be able to replace or modify the JS file. Alternately you can use local hosting tools to test your file and then upload it to the server once you've confirmed it's working.
If you explain what you level of access to your host is we can offer better suggestions.
Is it possible to use debug in cloud9 for javascript in HTML? I know it's possible to debug node.js, but what if the javascript is in a <script> block in the HTML, or is being loaded from an external script?
This works in Webstorm, but you have to have a browser plugin, and the IDE and the browser (via the plugin) talk to each other.
Thanks!
Cloud9 not provide a great visualization for debug but even so it doesn't a big problem.
You need open your application in another tab of the browser.
You have two ways:
If you use a "preview" mode for run an application, Cloud9 provide a URL that you can write in your bar browser.
If you use a server and this have the config for that it send your static files, when you run the server Cloud9 provide a URL in the console so you can write in your bar browser too. You need to consider the different routes in your server if it has not a single page application.
Once you will open the application in your browser, you can make your debugging.
Could somebody advise me on which project type should I use to develop client side of web-based app (HTML + JavaScript) for Visual Studio 2013?
I tried to create New, Web Site, ASP.NET Empty Web site, then manually added all .js files to the project, but this is not exactly what I need, because I am working on a client-side code only, and the Web server is not IIS.
Of course, when a script error occurs, I can select “Debug using selected debugger”, manually choose my project and jump into debugging. However, this is only a half-solution.
First, I cannot start debugger with F5 – it launches web page connected to local IIS instead.
Second, I have duplicate source trees in solution explorer- the debugger does not match my source files with files loaded with web pages.
I have also tried New, Other project types, Visual Studio solution, Add existing Web site, and played with Start Options, but without much success too. It launches page in IE, but with script debugging disabled (???), and it does not start the debugger anyway.
Is there an appropriate project type to write and debug JavaScript for IE?
PS: When installing VS, I selected C++ development, as my primary settings, which might hide some useful Web development features. And I would prefer not to change this.
UPDATE: Problem #1 (starting with F5) was solved by setting IE as default Web browser (I have used Firefox). After specifying “Specific page” in Start options F5 starts the page under debugger.
Is it possible to debug scripts under IE, leaving my favorite browser as default? If I specify “Start External program” and set “iexplore.exe” with page url, it launches the page but does not allow me to debug it.
you have a bunch of questions in here, but let me try answer them.
To develop client-side of web-based app, Create an ASP.NET Empty Web site and manually add HTML + JavaScript
If the Web Server is not IIS, then you can change, right-click on your project in VS-2013, and in properties,check Web properties.
To Debug your HTML and JavaScript in IE, then follow this:
you have to enable Script debugging in IE as follow:
let, if you have a function named FirstFunction() in your HTML page then
<script type="script/javascript">
function FirstFunction()
{
debugger;
alert("Debugging now");
}
</script>
I'm working on a webpage that has to work offline when it's finished. No XAMPP or other services available, so PHP is no option.
It has to create a new file, edit a filename (which would be the best solution) or move a file into another directory. This action has to be called from a function in jQuery.
I've read that Python could to this but as long as I read Python needs a web framework and a configured Apache as well, so if it's right Python is no possibility for me as well.
Is there any way to do this with JavaScript / jQuery or anything else which works offline?
No. It won't work by Design. Imagine, you visit a Website and it would install virus.exe into your Windows Directory (For example Autostart).
Html Pages are for Displaying Informationen to the User. Javascript is supporting it with dynamic Features. The Browser grant Rights for Loading other Information and nothing else. Everything which would affect the System, could not handled by Script.
If it should run from Web, you need a Plugin (Like Java). In your case (Offline Use) consider to write a Desktop Client (C#, VB.NET, Java, C++).
I have just loaded an existing ASP.NET project into Visual Studio 2010 that is targeted at .NET 2.0. When I attempt to run it, the first page throws an error indicating that the JQuery file was not loaded ($ is undefined). If I paste the contents of the JQuery file within tags on the login page, everything works. This indicates to me that the JQuery file is not being loaded. I have verified that the path is correct.
This problem is not just with the JQuery file but with all JavaScript files, as far as I can tell.
I have copied this entire project directly from someone else's machine. It works perfectly on their machine. The project, on my computer, is at exactly the same path as on their machine.
If I go to IIS on my machine, and right-click on this application under Default Web Site, then choose Manage Application >> Browse, the application is displayed correctly in a browser. (I have verified that the virtual directory in IIS is pointing to my source code folder) So, it appears this issue is specific to the Visual Studio environment.
What could possibly be preventing the Javascript from loading. (the CSS files seem to be loading without error).
Thanks in advance for any debugging advice you can give me.
There can be many things wrong. Have you tried using Fiddler or FireBug and determined if the resources are requested? If they are what is the status that is being returned?
Is Visual Studio using IIS or the built-in Webserver?