Skip to content

Commit 0d3e90a

Browse files
Make the dev docs more betterer (#21467)
* Make the dev docs more betterer * forestalled potential errors in select startup project
1 parent a9cd5a9 commit 0d3e90a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/DEVELOPMENT.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ This page contains steps to build and run the .NET MAUI repository from source.
1515
- Follow [these steps](https://learn.microsoft.com/en-us/dotnet/maui/get-started/installation?view=net-maui-8.0&tabs=visual-studio-code), installing VS Code, MAUI extension, .NET8, Xcode, OpenJDK, and Android SDK
1616
- Install Mono from [Mono Project](https://www.mono-project.com)
1717
- For Xcode, you can install from the [App Store](https://apps.apple.com/us/app/xcode/id497799835?mt=12) or [Apple Developer portal](https://developer.apple.com/download/more/?name=Xcode)
18+
- As of 26 March 2024, Xcode 15.3 is not yet supported. Check [this issue](https://github.com/dotnet/maui/issues/21057) for updates
19+
- Edit your `.zprofile` file to ensure that the following environment variables are set/modified (you may need to adjust the version of OpenJDK):
20+
```shell
21+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home
22+
export ANDROID_HOME=~/Library/Android/sdk
23+
export ANDROID_SDK_ROOT=~/Library/Android/sdk
24+
export PATH="$PATH:~/.dotnet/tools"
25+
export PATH="$PATH:$ANDROID_HOME/platform-tools"
26+
export PATH="$PATH:$ANDROID_HOME/tools"
27+
export PATH="$PATH:$ANDROID_HOME/tools/bin"
28+
export PATH="$PATH:$ANDROID_HOME/tools/emulator"
29+
```
30+
- In VSCode do `command--shift-P` then type `code path` and select the option `Shell Command: Install 'code' in PATH`
1831

1932
## Building the Build Tasks
2033
Before opening the solution in Visual Studio / VS Code you **MUST** build the build tasks.
@@ -143,6 +156,21 @@ These are tests that will not run on a device. This is useful for testing device
143156
│ │ ├── Essentials.UnitTests
144157
```
145158

159+
### Reproducing an Issue/Debugging .NET MAUI Code
160+
Open the .NET MAUI workspace in VSCode.
161+
In VSCode, select the device that you will be testing on. Using the command palette (ctrl-shift-P/command-shift-P) type `pick device` and
162+
you will be presented with a set of choices for your target device (Android, iOS, etc). Select one.
163+
There is a sample project in `src/Controls/samples/Controls.Sample.Sandbox`. This is an empty project
164+
into which you can add your code to reproduce an issue and also set breakpoints in .NET MAUI source code.
165+
Let VSCode know this is the project you want to select by going to the command palette (ctrl-shift-P/command-shift-P)
166+
and typing `pick startup` and select ".NET MAUI: Pick Startup Project" and select the Sandbox project.
167+
168+
Before using the command palette for the first time, you may have to wait a minute
169+
for intellisense and other tasks to complete before using the command palette. If the project hasn't
170+
'settled' yet, you will see an error "Pick Startup Project has resulted in an error."
171+
172+
*Note:* When you are committing your PR, do not include your changes to the Sandbox project.
173+
146174
### Integration Tests
147175
148176
The Integration test project under `src/TestUtils/src/Microsoft.Maui.IntegrationTests` contains tests which build and/or run MAUI templates or other projects.

0 commit comments

Comments
 (0)