{"id":4694,"date":"2008-01-31T12:40:00","date_gmt":"2008-01-31T12:40:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2008\/01\/31\/jscript-intellisense-handling-errors\/"},"modified":"2008-01-31T12:40:00","modified_gmt":"2008-01-31T12:40:00","slug":"jscript-intellisense-handling-errors","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/jscript-intellisense-handling-errors\/","title":{"rendered":"JScript IntelliSense: Handling Errors"},"content":{"rendered":"<p><P>I often get the question \u201cWhy isn\u2019t IntelliSense working?\u201d.&nbsp; The most common cause is an error in one of the referenced scripts.&nbsp; If there was an IntelliSense update error, the status bar will tell you.<\/P>\n<P><IMG border=\"1\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/error.png\" width=\"380\" height=\"64\"><\/P>\n<P>Given this situation, the Error List&nbsp; will complement the status bar with one of two messages.<\/P>\n<P><STRONG>Error Message 1: A script failed to execute\u2026<\/STRONG><\/P>\n<P><IMG border=\"1\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/error-normal.png\" width=\"678\" height=\"114\"><\/P>\n<P>This type of error is commonly caused by either a syntax error, calling a member that doesn\u2019t exist, or an infinite loop.&nbsp; The filename\/source is provided to help you debug.&nbsp; After the script error is fixed, IntelliSense will automatically retry.&nbsp; Note: I\u2019ve noticed the line number to be off by 1; we\u2019ll be fixing that.<\/P>\n<P><STRONG>Error Message 2: Something more serious\u2026<\/STRONG><\/P>\n<P><IMG border=\"1\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/error-timeout.png\" width=\"679\" height=\"139\"><\/P>\n<P>In rare occurrences, our execution\/analysis engine (TypeLibBuilder.exe) will crash due to the script input.&nbsp; A stack overflow is the only known cause for this.&nbsp; Rather than retrying the script in question, we will disable IntelliSense temporarily until you reopen the file.<\/P>\n<P><STRONG>Known JScript IntelliSense Limitations<\/STRONG><\/P>\n<P>While script errors may cause incomplete IntelliSense data, the following feature limitations may also be the root case:<\/P>\n<UL>\n<LI><STRONG>Invoking browser-specific objects is not recommended<\/STRONG> \u2013 Each browser provides a specific object model you can program against.&nbsp; We recommend that your library scripts are refrain from execution dependencies against these objects.&nbsp; Such invocations will lead to member-not-found errors while being analyzed by our execution\/analysis engine, which will affect IntelliSense.&nbsp; Note it\u2019s okay to have references to the object model (such as inside a function) as long it is not invoked at design-time.&nbsp; Note: It is a known issue that certain 3rd party frameworks are affected by this limitation and we are currently working to make accommodations there.<\/LI>\n<LI><STRONG>Referencing files outside of the project is not supported<\/STRONG> \u2013 IntelliSense will only be aware of references to files that are within your project scope.&nbsp; Referencing files in another domain or another virtual directory is known to fail.&nbsp; We are working to relax this constraint in the next major update.<\/LI>\n<LI><STRONG>XML Doc Comments IntelliSense for the active document is not supported<\/STRONG> \u2013 Due to an architectural limitation, you will not be able to see any XML Doc Comment info defined in the file you are currently in.&nbsp; Only XML Doc Comment data from referenced files will be visible.<BR><\/LI><\/UL>\n<P><STRONG>If All Else Fails\u2026<\/STRONG><\/P>\n<P>JScript IntelliSense was designed to continuously monitor changes and update IntelliSense accordingly.&nbsp; If for some reason it does not update, we\u2019ve added a command to force the mechanism to recalculate its data.&nbsp; You can find this command under \u201cEdit\u201d, \u201cIntelliSense\u201d, \u201cUpdate JScript IntelliSense\u201d.<BR>&nbsp;<BR><IMG border=\"1\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/error-command.jpg\" width=\"553\" height=\"129\"><\/P>\n<P>As a final note: \u201cAn escalator can never break, it can only become stairs.\u201d&nbsp; Likewise, in the event of an advanced IntelliSense failure, there should always be basic IntelliSense available for JScript intrinsic objects and their members.&nbsp; In tangible terms, if you type \u201cObject\u201d dot, the completion list should always contain \u201cprototype\u201d regardless of any script failures.&nbsp; In the unlikely event there is no IntelliSense at all, please feel free to let me know personally at jking-at-microsoft-dot-com.<\/P>\n<P>Hope this helps!<\/P>\n<P><STRONG>Jeff King<\/STRONG><BR>Program Manager<BR>Visual Studio Web Tools<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I often get the question \u201cWhy isn\u2019t IntelliSense working?\u201d.&nbsp; The most common cause is an error in one of the referenced scripts.&nbsp; If there was an IntelliSense update error, the status bar will tell you. Given this situation, the Error List&nbsp; will complement the status bar with one of two messages. Error Message 1: A [&hellip;]<\/p>\n","protected":false},"author":404,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[7279,31,7276,7277,7274,7272,147,7267,7268,7269],"class_list":["post-4694","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-ajax","tag-asp-net","tag-intellisense","tag-jeff-king","tag-jscript","tag-tips-and-tricks","tag-visual-studio","tag-vwd","tag-web","tag-web-2-0"],"acf":[],"blog_post_summary":"<p>I often get the question \u201cWhy isn\u2019t IntelliSense working?\u201d.&nbsp; The most common cause is an error in one of the referenced scripts.&nbsp; If there was an IntelliSense update error, the status bar will tell you. Given this situation, the Error List&nbsp; will complement the status bar with one of two messages. Error Message 1: A [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/4694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/404"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=4694"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/4694\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=4694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=4694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=4694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}