Skip to content

Commit

Permalink
Merge branch 'master' into brpeek-syncupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
ghogen authored Mar 20, 2017
2 parents ce438e2 + 0d129b4 commit d967ee1
Show file tree
Hide file tree
Showing 650 changed files with 15,546 additions and 14,859 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
30 changes: 29 additions & 1 deletion docs/test/live-unit-testing-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ translation.priority.ht:

## Does Live Unit Testing work with .NET Core?

**Answer:**

Live Unit Testing currently does not work with .NET Core. We are working to add this support in the future.

## Why doesn’t Live Unit Testing work when I turn it on?

**Answer:**

The **Output Window** (when the Live Unit Testing drop-down is selected) should tell you why Live Unit Testing is not working. Live Unit testing may not work for one of the following reasons:

- If NuGet packages referenced by the projects in the solution have not been restored, Live Unit Testing will not work. Doing an explicit build of the solution or restoring NuGet packages in the solution before turning Live Unit Testing on should resolve this issue.
Expand All @@ -53,6 +57,8 @@ The **Output Window** (when the Live Unit Testing drop-down is selected) should

## Can I customize my Live Unit Testing builds?

**Answer:**

If your solution requires custom steps to build for instrumentation (Live Unit Testing) that are not required for the "regular" non-instrumented build, then you can add code to your project or .targets files that checks for the `BuildingForLiveUnitTesting` property and performs custom pre/post build steps. You can also choose to remove certain build steps (like publishing or generating packages) or to add build steps (like copying prerequisites) to a Live Unit Testing build based on this project property. This will not alter your regular build in any way and will only impact Live Unit Testing builds.

For example, there may be a target that produces NuGet packages during a regular build. You probably do not want NuGet packages to be generated after every edit you make. So you can disable that target in the Live Unit Testing build by doing something like the following:  
Expand All @@ -63,10 +69,12 @@ For example, there may be a target that produces NuGet packages during a regular
</Target>
```

## Error messages with `<OutputPath>` or `<OutDir>`
## Error messages with &lt;OutputPath&gt; or &lt;OutDir&gt;

**Why do I get the following error when Live Unit Testing tries to build my solution: “...appears to unconditionally set `<OutputPath>` or `<OutDir>`. Live Unit Testing will not execute tests from the output assembly”?**

**Answer:**

This can happen if the build process for your solution unconditionally overrides `<OutputPath>` or `<OutDir>` so that it is not a subdirectory of `<BaseOutputPath>`. In such cases, Live Unit Testing will not work because it also overrides these to ensure that build artifacts are dropped to a folder under `<BaseOutputPath>`. If you must override the location where you want your build artifacts to be dropped in a regular build, override the `<OutputPath>` conditionally based on `<BaseOutputPath>`.

For example, if your build overrides the `<OutputPath>` as shown below:
Expand Down Expand Up @@ -98,10 +106,14 @@ Do not override `<OutDir>` directly in your build process; override `<OutputPath

**I want the artifacts of a Live Unit Testing build to go to a specific location instead of the default location under the `.vs` folder. How can I change that?**

**Answer:**

Set the `LiveUnitTesting_BuildRoot` user-level environment variable to the path where you want the Live Unit Testing build artifacts to be dropped. 

## How is running tests from Test Explorer window different from running tests in Live Unit Testing?

**Answer:**

There are several differences:

- Running or debugging tests from the Test Explorer window runs regular binaries, whereas Live Unit Testing runs instrumented binaries. If you want to debug instrumented binaries, adding a [Debugger.Launch](xref:System.Diagnostics.Debugger.Launch) method call in your test method causes the debugger to launch whenever that method is executed (including when it is executed by Live Unit Testing), and you can then attach and debug the instrumented binary. However, our hope is that instrumentation is transparent to you for most user scenarios, and that you do not need to debug instrumented binaries.
Expand All @@ -116,6 +128,8 @@ There are several differences:

## How do I exclude tests from participating in Live Unit Testing?

**Answer:**

See the "Including and excluding test projects and test methods" section of the [Use Live Unit Testing in Visual Studio 2017 Enterprise Edition](live-unit-testing.md#including-and-excluding-test-projects-and-test-methods) topic for the user-specific setting. This is extremely useful when you want to run a specific set of tests for a particular edit session or to persist your own personal preferences.

For solution-specific settings, you can apply the <xref:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute?displayProperty=fullName> attribute programmatically to exclude methods, properties, classes, or structures from being instrumented by Live Unit Testing. Additionally, you can also set the `<ExcludeFromCodeCoverage>` property to `true` in your project file to exclude the whole project from being instrumented. Live Unit Testing will still run the tests that have not been instrumented, but their coverage will not be visualized.
Expand Down Expand Up @@ -143,6 +157,8 @@ public class Class1

## Why are Win32 PE headers different in instrumented assemblies built by Live Unit testing?

**Answer:**

There is a known bug that may result in Live Unit Testing builds failing to embed the following Win32 PE Header data:

- File Version (specified by @System.Reflection.AssemblyFileVersionAttribute in code).
Expand All @@ -155,30 +171,42 @@ Tests that rely on these values may fail when executed by Live Unit testing.

## Why does Live Unit testing keep building my solution all the time even if I am not making any edits?

**Answer:**

This can happen if the build process of your solution generates source code that is part of the solution itself, and your build target files do not have appropriate inputs and outputs specified. Targets should be given a list of inputs and outputs so that MSBuild can perform the appropriate up-to-date checks and determine whether a new build is required.

Live Unit Testing starts a build whenever it detects that source files have changed. Because the build of your solution generates source files, Live Unit Testing will get into an infinite build loop. If, however, the inputs and outputs of the target are checked when Live Unit Testing starts the second build (after detecting the newly generated source files from the previous build), it will break out of the loop because the inputs and outputs checks will indicate that everything is up-to-date.  

## How does Live Unit testing work with the Lightweight Solution Load feature?

**Answer:**

Live Unit Testing currently doesn’t work well with the Lightweight Solution load feature if all projects in the solution are not yet loaded. You may get incorrect coverage information in such scenarios.

## Why does Live Unit Testing does not capture coverage from a new process created by a test?

**Answer:**

This is a known issue which we were not able to fix in Visual Studio 2017 release. It should be fixed in a subsequent update of Visual Studio 2017.

## Why does nothing happen after I include or exclude tests from the Live Test set?

**Answer:**

This is a known issue. To work around this, you will need to make an edit to any file after you have included or excluded tests. 

## Live Unit Testing and editor icons

**Why do I not see any icons in the editor even though Live Unit Testing seems to be running the tests based on the messages in the output window?**

**Answer:**

This happens if the assemblies that Live Unit Testing is operating on are not instrumented for any reason. For example, Live Unit Testing is not compatible with projects that set `<UseHostCompilerIfAvailable>false</UseHostCompilerIfAvailable>`. In this case, your build process will need to be updated to either remove this setting or to change it to `true` for Live Unit Testing to work. 

## How do I collect more detailed logs to file bug reports?

**Answer:**

You can do several things to collect more detailed logs:

- Go to **Tools**, **Options**, **Live Unit Testing** and change the logging option to **Verbose**. This causes more detailed logs to be shown in the output window.
Expand Down
2 changes: 1 addition & 1 deletion docs/test/live-unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ translation.priority.ht:
As you are developing an application, Live Unit Testing automatically runs any impacted unit tests in the background and presents the results and code coverage live in the Visual Studio IDE in real-time. As you modify your code, Live Unit Testing provides feedback on how your changes impacted existing tests and whether the new code you've added is covered by one or more existing tests. This will gently remind you to write unit tests as you are making bug fixes or adding new features.

> [!NOTE]
> Live Unit Testing is available in the for C# and Visual Basic projects that target the .NET Framework in the Enterprise Edition of Visual Studio 2017. Currently, it is not available with .NET Core.
> Live Unit Testing is available for C# and Visual Basic projects that target the .NET Framework in the Enterprise Edition of Visual Studio 2017. Currently, it is not available with .NET Core.
## Supported test frameworks

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
Loading

0 comments on commit d967ee1

Please sign in to comment.