Skip to content

Commit

Permalink
Merge pull request #342 from Microsoft/scripting
Browse files Browse the repository at this point in the history
scripting fixes for dev_lang values for F1 and filter
  • Loading branch information
ghogen authored Mar 20, 2017
2 parents edb6c75 + 56bc6dd commit 0d129b4
Show file tree
Hide file tree
Showing 648 changed files with 15,516 additions and 14,857 deletions.
17 changes: 10 additions & 7 deletions docs/debugger/debugger-feature-tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Although the demo app is C#, the features are applicable to C++, Visual Basic, J

![Solution Explorer](../debugger/media/dbg-tour-solution-explorer.png "Solution Explorer")

4. Press F5 (**Debug / Start Debugging** or the green arrow ![Start Debugging](../debugger/media/dbg-tour-start-debugging.png "Start Debugging") button in the Debug Toolbar).
4. Press F5 (**Debug / Start Debugging** or the **Start Debugging** button ![Start Debugging](../debugger/media/dbg-tour-start-debugging.png "Start Debugging") in the Debug Toolbar).

![Photo Viewer App](../debugger/media/dbg-tour-wpf-app.png "Photo Viewer App")

Expand All @@ -78,7 +78,7 @@ Mostly, we will use the keyboard shortcuts here, because it's the best way to ge

![F11 Step Into](../debugger/media/dbg-tour-f11-start.png "F11 Step Into")

The yellow arrow represents the line of code on which the debugger paused, which also suspends app execution at the same point (this line of code has not yet executed).
The yellow arrow represents the statement on which the debugger paused, which also suspends app execution at the same point (this statement has not yet executed).

F11 is the **Step Into** command and advances the app execution one statement at a time. F11 is a good way to examine the execution flow in the most detail. (To move faster through code, we will show you some other options in later steps.) By default, the debugger skips over non-user code (if you want more details, see [Just My Code](../debugger/just-my-code.md)).

Expand All @@ -89,7 +89,7 @@ Mostly, we will use the keyboard shortcuts here, because it's the best way to ge

![F10 Step Over](../debugger/media/dbg-tour-f10-step-over.png "F10 Step Over")

F10 advances the debugger without stepping into functions or methods in your app code. By pressing F10 on the InitializeComponent method call (instead of F11), we skipped over the implementation code for InitializeComponent (which maybe we're not interested in right now).
F10 advances the debugger without stepping into functions or methods in your app code (the code still executes). By pressing F10 on the InitializeComponent method call (instead of F11), we skipped over the implementation code for InitializeComponent (which maybe we're not interested in right now).

## Set a breakpoint

Expand Down Expand Up @@ -173,11 +173,11 @@ Mostly, we will use the keyboard shortcuts here, because it's the best way to ge
2. Next, take a look at the **Locals** window.
The **Locals** window shows you the variables that are currently in scope.
The **Locals** window shows you the variables that are in the current scope.
![Locals Window](../debugger/media/dbg-tour-locals-window.png "Locals Window")
Currently, the `this` object and the File object (`f`) are in scope. For more info, see [Inspect Variables in the Autos and Locals Windows](../debugger/autos-and-locals-windows.md).
Currently, the `this` object and the File object (`f`) are in the current scope. For more info, see [Inspect Variables in the Autos and Locals Windows](../debugger/autos-and-locals-windows.md).
## Set a watch
Expand Down Expand Up @@ -213,7 +213,7 @@ Mostly, we will use the keyboard shortcuts here, because it's the best way to ge
You can use right-click menus from the **Call Stack** window to do things like insert breakpoints into specified functions, restart your app using **Run to Cursor**, and to go examine source code. See [How to: Examine the Call Stack](../debugger/how-to-use-the-call-stack-window.md)
You can double-click a line of code to go look at that source code (without advancing the debugger).
You can double-click a line of code to go look at that source code (without advancing the debugger) and that also changes the current scope being inspected by the debugger.
## Change the execution flow
Expand All @@ -225,7 +225,10 @@ Mostly, we will use the keyboard shortcuts here, because it's the best way to ge
2. Now, press F5.
You can see the images added to the app window. Because you are re-running code in the `foreach` loop, some of the images have been added twice! So, sometimes you need to be careful with this feature, and you see a warning in the tooltip. You may see other warnings, too.
You can see the images added to the app window. Because you are re-running code in the `foreach` loop, some of the images have been added twice!
> [!WARNING]
> Sometimes you need to be careful with this feature, and you see a warning in the tooltip. You may see other warnings, too. This does not undo any changes to the state of your application.
## Run to cursor
Expand Down
4 changes: 2 additions & 2 deletions docs/debugger/includes/remote-debugger-download.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ translation.priority.ht:

|Version|Link|Notes|
|-|-|-|
|Visual Studio 2017 RC|[Remote Tools](https://www.visualstudio.com/downloads/#remote-tools-for-visual-studio-2017-rc)|Always download the version matching your device operating system (x86, x64, or ARM version)|
|Visual Studio 2015 Update 3|[Remote tools](https://www.visualstudio.com/downloads/#remote-tools-for-visual-studio-2015-update-3)|Always download the version matching your device operating system (x86, x64, or ARM version)|
|Visual Studio 2017|[Remote Tools](https://www.visualstudio.com/downloads/#remote-tools-for-visual-studio-2017)|Always download the version matching your device operating system (x86, x64, or ARM version)|
|Visual Studio 2015 Update 3|[Remote tools](https://my.visualstudio.com/Downloads?q=remote%20tools%20visual%20studio%202015)|If prompted, join the free Visual Studio Dev Essentials group or you can just sign in with a valid Visual Studio subscription. Then re-open the link if necessary.|
|Visual Studio 2015 (older)|[Remote tools](https://my.visualstudio.com/Downloads?q=remote%20tools%20visual%20studio%202015)|If prompted, join the free Visual Studio Dev Essentials group or you can just sign in with a valid Visual Studio subscription. Then re-open the link if necessary.|
|Visual Studio 2013|[Remote tools](https://msdn.microsoft.com/library/bt727f1t(v=vs.120).aspx#BKMK_Installing_the_Remote_Tools)|Download page in Visual Studio 2013 documentation|
|Visual Studio 2012|[Remote tools](https://msdn.microsoft.com/library/bt727f1t(v=vs.110).aspx#BKMK_Installing_the_Remote_Tools)|Download page in Visual Studio 2012 documentation|
Expand Down
16 changes: 16 additions & 0 deletions docs/profiling/profiling-feature-tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,21 @@ If you need features such as instrumentation that are not currently present in C

![Performance Explorer](../profiling/media/prof-tour-performance-explorer.png "Performance Explorer")

## Which Tool Should I Use?
Here is a table that lists the different tools Visual Studio offers and the different project types you can use them with:

|Performance Tool|Windows desktop|Windows Universal/Store|ASP.NET/ASP.NET Core|
|----------------------|---------------------|------------------------------|-------------|
|[Memory Usage](../profiling/memory-usage.md)|yes|yes|yes|
|[CPU Usage](../profiling/cpu-usage.md)|yes|yes|yes|
|[GPU Usage](../debugger/gpu-usage.md)|yes|yes|no|
|[Application Timeline](../profiling/application-timeline.md)|yes|yes|no|
|[PerfTips](../profiling/perftips.md)|yes|yes for XAML, no for HTML|yes|
|[Performance Explorer](../profiling/performance-explorer.md)|yes|no|yes (no for ASP.NET Core)|
|[IntelliTrace](../debugger/intellitrace.md)|.NET Enterprise only|.NET Enterprise only|.NET Enterprise only|
|[Network Usage](../profiling/network-usage.md)|no|yes|no|
|[HTML UI responsiveness](../profiling/html-ui-responsiveness.md)|no|yes for HTML, no for XAML|no|
|[JavaScript Memory](../profiling/javascript-memory.md)|no|yes for HTML, no for XAML|no|

## See Also
[Debugging in Visual Studio](../debugger/debugging-in-visual-studio.md)
9 changes: 5 additions & 4 deletions docs/profiling/profiling-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,16 @@ Profiling and diagnostics tools help you diagnose memory and CPU usage and other
## Which Tool Should I Use?
Here is a table that lists the different tools Visual Studio offers and the different project types you can use them with:

|Performance Tool|Windows desktop|Windows Universal/Store|ASP.NET|
|Performance Tool|Windows desktop|Windows Universal/Store|ASP.NET/ASP.NET Core|
|----------------------|---------------------|------------------------------|-------------|
|[Memory Usage](../profiling/memory-usage.md)|yes|yes|yes|
|[CPU Usage](../profiling/cpu-usage.md)|yes|yes|yes|
|[GPU Usage](../debugger/gpu-usage.md)|yes|yes|no|
|[Application Timeline](../profiling/application-timeline.md)|yes|yes|no|
|[PerfTips](../profiling/perftips.md)|yes|yes for XAML, no for HTML|no|
|[Performance Explorer](../profiling/performance-explorer.md)|yes|no|yes|
|[IntelliTrace](../debugger/intellitrace.md)|.NET Enterprise only|.NET Enterprise only|.NET Enterprise only|
|[PerfTips](../profiling/perftips.md)|yes|yes for XAML, no for HTML|yes|
|[Performance Explorer](../profiling/performance-explorer.md)|yes|no|yes (no for ASP.NET Core)|
|[IntelliTrace](../debugger/intellitrace.md)|.NET Enterprise only|.NET Enterprise only|.NET Enterprise only|
|[Network Usage](../profiling/network-usage.md)|no|yes|no|
|[HTML UI responsiveness](../profiling/html-ui-responsiveness.md)|no|yes for HTML, no for XAML|no|
|[JavaScript Memory](../profiling/javascript-memory.md)|no|yes for HTML, no for XAML|no|

Expand Down
53 changes: 27 additions & 26 deletions scripting-docs/javascript/advanced/advanced-javascript.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
---
title: "Advanced JavaScript | Microsoft Docs"
ms.custom: ""
ms.date: "01/18/2017"
ms.prod: "windows-client-threshold"
ms.reviewer: ""
ms.suite: ""
ms.technology:
- "devlang-javascript"
ms.tgt_pltfrm: ""
ms.topic: "article"
dev_langs:
- "JavaScript"
- "DHTML"
helpviewer_keywords:
- "troubleshooting, JavaScript"
- "troubleshooting scripts"
- "arrays [JavaScript]"
- "recursive procedures, JavaScript"
ms.assetid: ea26b6a1-e5c6-40d5-ac33-3961f584f941
caps.latest.revision: 18
author: "mikejo5000"
ms.author: "mikejo"
manager: "ghogen"
---
# Advanced JavaScript
---
title: "Advanced JavaScript | Microsoft Docs"
ms.custom: ""
ms.date: "01/18/2017"
ms.prod: "windows-client-threshold"
ms.reviewer: ""
ms.suite: ""
ms.technology:
- "devlang-javascript"
ms.tgt_pltfrm: ""
ms.topic: "article"
dev_langs:
- "JavaScript"
- "TypeScript"
- "DHTML"
helpviewer_keywords:
- "troubleshooting, JavaScript"
- "troubleshooting scripts"
- "arrays [JavaScript]"
- "recursive procedures, JavaScript"
ms.assetid: ea26b6a1-e5c6-40d5-ac33-3961f584f941
caps.latest.revision: 18
author: "mikejo5000"
ms.author: "mikejo"
manager: "ghogen"
---
# Advanced JavaScript
These sections explain advanced [!INCLUDE[javascript](../../javascript/includes/javascript-md.md)] functionality, such as recursion, arrays, troubleshooting, and so on.

## In This Section
Expand Down
47 changes: 24 additions & 23 deletions scripting-docs/javascript/advanced/collections-javascript.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
---
title: "Collections (JavaScript) | Microsoft Docs"
ms.custom: ""
ms.date: "01/18/2017"
ms.prod: "windows-client-threshold"
ms.reviewer: ""
ms.suite: ""
ms.technology:
- "devlang-javascript"
ms.tgt_pltfrm: ""
ms.topic: "article"
dev_langs:
- "JavaScript"
- "DHTML"
ms.assetid: 23c26185-6a7b-4b69-9d22-63e1841b4905
caps.latest.revision: 4
author: "mikejo5000"
ms.author: "mikejo"
manager: "ghogen"
---
# Collections (JavaScript)
---
title: "Collections (JavaScript) | Microsoft Docs"
ms.custom: ""
ms.date: "01/18/2017"
ms.prod: "windows-client-threshold"
ms.reviewer: ""
ms.suite: ""
ms.technology:
- "devlang-javascript"
ms.tgt_pltfrm: ""
ms.topic: "article"
dev_langs:
- "JavaScript"
- "TypeScript"
- "DHTML"
ms.assetid: 23c26185-6a7b-4b69-9d22-63e1841b4905
caps.latest.revision: 4
author: "mikejo5000"
ms.author: "mikejo"
manager: "ghogen"
---
# Collections (JavaScript)
You can use the collection objects [Map](../../javascript/reference/map-object-javascript.md), [Set](../../javascript/reference/set-object-javascript.md), and [WeakMap](../../javascript/reference/weakmap-object-javascript.md) to store values and objects. These objects provide convenient methods for adding and retrieving members by using either a key or a value instead of an index. To access members of a collection by using an index, use an `Array` object. For more information, see [Using Arrays](../../javascript/advanced/using-arrays-javascript.md).

> [!CAUTION]
Expand All @@ -31,7 +32,7 @@ You can use the collection objects [Map](../../javascript/reference/map-object-j

The following example shows how to use the `Map` object. In this example, you access members by using both `get` and `forEach`. The callback function in `forEach` can take up to three parameters, which provide the value of the current collection element, the key of the current element, and the collection object itself.

```javascript
```JavaScript
var m = new Map();
m.set(1, "black");
m.set(2, "red");
Expand Down Expand Up @@ -59,7 +60,7 @@ m.forEach(function (value, key, mapObj) {

The following example shows how to use the `Set` object. In this example, the callback function takes one parameter, which is the value of the current collection element.

```javascript
```JavaScript
var s = new Set();
s.add("Thomas Jefferson");
s.add(1776);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ f1_keywords:
- "ConditionalComp_JavaScript"
dev_langs:
- "JavaScript"
- "TypeScript"
- "DHTML"
helpviewer_keywords:
- "conditional compilation, overview"
Expand All @@ -24,23 +25,23 @@ ms.author: "mikejo"
manager: "ghogen"
---
# Conditional Compilation (JavaScript)
Conditional compilation allows the use of new [!INCLUDE[javascript](../../javascript/includes/javascript-md.md)] language features without sacrificing compatibility with older versions that do not support the features.

> [!WARNING]
> Conditional compilation is supported in all versions of Internet Explorer prior to Internet Explorer 11. Starting with Internet Explorer 11 Standards mode, and in [!INCLUDE[win8_appname_long](../../javascript/includes/win8-appname-long-md.md)] apps, conditional compilation is not supported.
## Statements
Conditional compilation is activated by using the `@cc_on` statement, or using an `@if` or `@set` statement. Some typical uses for conditional compilation include using new features in [!INCLUDE[javascript](../../javascript/includes/javascript-md.md)], embedding debugging support into a script, and tracing code execution.

Always place conditional compilation code in comments, so that hosts (like Netscape Navigator) that do not support conditional compilation will ignore it. Here is an example.

```javascript
/*@cc_on @*/
/*@if (@_jscript_version >= 4)
alert("JavaScript version 4 or better");
@else @*/
alert("Conditional compilation not supported by this scripting engine.");
/*@end @*/
```

Conditional compilation allows the use of new [!INCLUDE[javascript](../../javascript/includes/javascript-md.md)] language features without sacrificing compatibility with older versions that do not support the features.

> [!WARNING]
> Conditional compilation is supported in all versions of Internet Explorer prior to Internet Explorer 11. Starting with Internet Explorer 11 Standards mode, and in [!INCLUDE[win8_appname_long](../../javascript/includes/win8-appname-long-md.md)] apps, conditional compilation is not supported.
## Statements
Conditional compilation is activated by using the `@cc_on` statement, or using an `@if` or `@set` statement. Some typical uses for conditional compilation include using new features in [!INCLUDE[javascript](../../javascript/includes/javascript-md.md)], embedding debugging support into a script, and tracing code execution.

Always place conditional compilation code in comments, so that hosts (like Netscape Navigator) that do not support conditional compilation will ignore it. Here is an example.

```JavaScript
/*@cc_on @*/
/*@if (@_jscript_version >= 4)
alert("JavaScript version 4 or better");
@else @*/
alert("Conditional compilation not supported by this scripting engine.");
/*@end @*/
```

This example uses special comment delimiters that are used only if conditional compilation is activated by the `@cc_on` statement. Scripting engines that do not support conditional compilation see only the message that says conditional compilation is not supported.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ms.tgt_pltfrm: ""
ms.topic: "article"
dev_langs:
- "JavaScript"
- "TypeScript"
- "DHTML"
helpviewer_keywords:
- "conditional compilation, variables"
Expand All @@ -21,22 +22,22 @@ ms.author: "mikejo"
manager: "ghogen"
---
# Conditional Compilation Variables (JavaScript)
The following predefined variables are available for conditional compilation. If a variable is not **true**, it is not defined and behaves as `NaN` when accessed.

> [!WARNING]
> Conditional compilation is supported in all versions of Internet Explorer prior to Internet Explorer 11. Starting with Internet Explorer 11 Standards mode, and in [!INCLUDE[win8_appname_long](../../javascript/includes/win8-appname-long-md.md)] apps, conditional compilation is not supported.
## Variables

|Variable|Description|
|--------------|-----------------|
|@_win32|True if running on a Win32 system.|
|@_win16|True if running on a Win16 system.|
|@_mac|True if running on an Apple Macintosh system.|
|@_alpha|True if running on a DEC Alpha processor.|
|@_x86|True if running on an Intel processor.|
|@_mc680x0|True if running on a Motorola 680x0 processor.|
|@_PowerPC|True if running on a Motorola PowerPC processor.|
|@_jscript|Always true.|
|@_jscript_build|Contains the build number of the [!INCLUDE[javascript](../../javascript/includes/javascript-md.md)] scripting engine.|
The following predefined variables are available for conditional compilation. If a variable is not **true**, it is not defined and behaves as `NaN` when accessed.

> [!WARNING]
> Conditional compilation is supported in all versions of Internet Explorer prior to Internet Explorer 11. Starting with Internet Explorer 11 Standards mode, and in [!INCLUDE[win8_appname_long](../../javascript/includes/win8-appname-long-md.md)] apps, conditional compilation is not supported.
## Variables

|Variable|Description|
|--------------|-----------------|
|@_win32|True if running on a Win32 system.|
|@_win16|True if running on a Win16 system.|
|@_mac|True if running on an Apple Macintosh system.|
|@_alpha|True if running on a DEC Alpha processor.|
|@_x86|True if running on an Intel processor.|
|@_mc680x0|True if running on a Motorola 680x0 processor.|
|@_PowerPC|True if running on a Motorola PowerPC processor.|
|@_jscript|Always true.|
|@_jscript_build|Contains the build number of the [!INCLUDE[javascript](../../javascript/includes/javascript-md.md)] scripting engine.|
|@_jscript_version|Contains the [!INCLUDE[javascript](../../javascript/includes/javascript-md.md)] version number in major.minor format.|
Loading

0 comments on commit 0d129b4

Please sign in to comment.