I'm learning Ext JS so I installed the Sencha.vscode-extjs extension v1.0.1 in my Visual Studio Code (which is new as well, just downloaded today). I want this plugin because I saw where you can put your cursor on something like a controller and do Control+MouseClick and it will open that file. Very handy when dealing with large Ext Js apps. But I can't seem to get that feature to work. I keep seeing No definition found for 'main'...
I have verified that the extension did finish indexing everything by looking at the vscode-extjs.log file. It did take a very long time to index because I also have all the example Ext Js apps. Any idea what I'm missing? Thanks!
UPDATE: The controller is in the same folder, see image...
I think I finally figured it out. I can now Ctrl+Hover over extend, controller, requires, etc... and it will show a popup of its definition and when I Ctrl+MouseClick (or press F12) it opens that file. What I did to make it work was I opened just a single Ext JS app folder then waited for the plugin to index everything. That's it. Before, I had my entire "Projects" directory open in Visual Studio Code which contained about 8 sub folders all of which were Ext JS apps. So maybe there were naming conflicts between the different apps or maybe this plugin just wasn't intended to work with multiple apps at once.
Related
If we are using vscode in the browser to edit an html file or project, is there a way to view the page?
I think I know what you mean.
On my chromebook I use vscode.dev in one browser tab, and then just drag and drop the .html file in to an empty browser tab and it can run Vanilla JS, CSS3, and HTML without anything else.
Refresh after each save, or install a live server. You could also have VScode running node, or whatever, in the background and just edit in vscode.dev, but that seems a bit excessive.
(Before I was using Crostini to run VScode on my chromebook and it would sometimes become very slow, buggy, or keep flickering (gpu style), and I'd have to restart/kill crostini to fix it, so finding vscode.dev has really helped when I can't find time to get to my workstation.)
CodeSwing is an extension that works in vscode.dev that does this.
Description: Interactive coding playground for building web applications (aka swings).
Id: codespaces-contrib.codeswing
VS Marketplace Link:
https://marketplace.visualstudio.com/items?itemName=codespaces-Contrib.codeswing
How can I debug JavaScript for my website in IntelliJ IDEA without changing my build configuration?
I am able to debug the JavaScript in Chrome Console but it does not work very well.
Answer. It is really easy:
Create a new JavaScript Debug Run configuration and specify the WAMP address you normally use to open your application in browser as URL there. See https://www.jetbrains.com/help/webstorm/2017.2/debugging-javascript-in-chrome.html#d45520e154 and linked topics.
You might also need to configure URL mappings in your configuration - https://www.jetbrains.com/help/webstorm/2017.2/debugging-javascript-deployed-to-a-remote-server.html#d46122e202
First you need to add intellij plugin for chrom and install it on chrom, then on configuration debug
you need to choose run with javascript.
I can show you screenshot if you want
It is worth noting that you should have linked separate .js files for debugging. I was trying to debug JavaScript code which was within an .html file but the breakpoints were never hit. I looked later under the resources in Chrome Inspector and found out that the lines were not synchronized between the files, because for the debugger the first line was the first JavaScript line, but for the html file it was the first line of the file (DOCTYPE)
So today Visual Studio (2013/Update1) thought it would be amusing to do a checkout every time I open a Javascript file. It only happens with javascript files -- .css and .cs files in the same project work just fine.
I've tried diffing my project file in source control, and I don't see anything that would cause it (there are a lot of changes, because I just updated some nuget packages, but the changes all seemed to just be file includes for the swapped out .js libraries).
I've tried the obvious stuff, like rebooting and deleting my .suo file. For now, I guess it's just a nuisance, but I would like to fix it.
I am running Resharper 8.1, if that could have anything to do with it.
It appears that the latest Web Essentials update, 1.8, has fixed this issue.
This seems to be the bug we were experiencing: https://github.com/madskristensen/WebEssentials2013/issues/596
In one of my solutions in javascripts files the intellisense suddenly stopped working.
All of the features are disabled - ctrl+space doesn't bring the list - like this
I took the print screen from another solution
and also the file looks like it was plain text -keywords has no colors.
I tried to open new solution and move the files there - still the same.
Files has intellisense only when I am debugging.
It feels like VS2010 see that those files are text files instead of js files.
It has something to do with tfs because it first happened to another member of the team and as soon as I took latest version of the solution - it happened to me.
When I create new js file - it looks fine , BUT after saving
the file , closing and reopen - again it is not colored
I found out that the problem is in one specific project - if I add js files to another project in the same solution it seems to be ok.
After some research and tests. This problem could be a couple of things:
Your file's extension is not .JS.
You are using an express edition.
You have not installed the Web Developer component on your installation (or removed it).
Let me know if this help you, If not I will look forward something else.
The complete reference about the JScript Intellisense on msdn:
http://msdn.microsoft.com/en-us/library/vstudio/bb385682(v=vs.100).aspx
As you can see in the image below, I just created a single javascript file in my Visual Studio 2010 with Web developers components and it is working:
So I solved this problem ....
I wanted to watch some value with QuickWatch (Shift+F9)
I got the message "Unable to evaluate the expression. The object invoked has disconnected from its clients." I pressed the green icon to refresh the values. After I closed the QuickWatch window I realized that I got the intellisense and highlighting back.
After a checkin to TFS, my colleague pulled the solution and got the intellisense and highlighting back as well.
Probably some weird bug in VS2010.
I've just setup Eclipse with Aptana Studio 3 and have been trying to get code completion / code hinting / autocomplete to work with mixed results.
I've followed the instructions here: http://wiki.appcelerator.org/display/tis/JavaScript+Library+Support
What I have discovered through testing is that when you install the .sdocml file and nothing else in a new project, it works fine.
As soon as I add a local copy of Dojo into the project the code hinting no longer works correctly.
I tried excluding the directory from view with a filter but that excludes it from the server so you can't use it. I've also tried removing the Dojo folder from Indexing but that changes nothing either.
If I load Dojo from a CDN, like Google, then I can use code completion.
The issue is that Eclipse picks up a parsed reference to dojo instead of the one from the sdocml file.
The problem seems, so far, to be confined to typing 'dojo.' but 'dijit.' and 'dojox.' work okay, maybe because of the parent-child relationship between those sub-libraries, if I were to guess.
I don't know if this is an Aptana bug or an Eclipse bug, but either way, it's a problem.
Does anyone know how to prioritize the code hinting sources and / or exclude certain directories from being a hinting source? Or is there another solution?
Thanks in advance,
Ken
Edit: Now that I have more code in the test project hinting does not work at all for 'dojo.' but still works fine for 'dojox.' and 'dijit.'. Only native JS methods hinting is available as a subset of 'dojo.'