Coder Social home page Coder Social logo

vscode-comet's Introduction

Comet Extension

Build .NET 6 Mobile Apps with MVU style UI with Comet

Debug experience

  • Build and launch the app on the emulator
  • Locals, Stacks, breakpoints, etc.
  • Supports Android and iOS/MacCatalyst (macOS only)

Run from Source

Prerequisites

  • Powershell Core
  • Node (npm)
  • Typescript: npm install -g typescript
  • VSCE (to package VSIX): npm install -g vsce
  • .NET 6 Preview with Android/iOS/Catalyst workloads (Install dotnet tool install -g redth.net.maui.check and run maui-check to ensure your environment is setup correctly)
  • Mono (mac only)
  • VSCode on Mac must have the "omnisharp.useGlobalMono": "never" setting to properly load net7.0 projects!
  1. Clone repo recursively git clone --recursive [email protected]:clancey/vscode-comet.git
  2. pwsh build.ps1 build
  3. npm i
  4. Debug the extension (there's an Extension launch profile already setup in launch.json), and open up a .NET 6 project in the new VS Code instance being debugged.

Debugging a .NET Mobile app with the Extension

  1. Create a .vscode/launch.json file (The Debug tab has a "Create launch .json file" button which can help - choose 'Comet for .NET Mobile' from the list):
{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Debug",
			"type": "comet",
			"request": "launch",
			"preLaunchTask": "comet: Build"
		}
	]
}
  1. Choose a Startup Project from the status bar menu.
  2. Choose a Device from the status bar menu.
  3. Start debugging!

Debugging the mobile-debug.exe process

  1. Open the ./src/mobile-debug/mobile-debug.sln in Visual Studio
  2. Set the startup / debug args to --server (this tells the mobile-debug.exe process to listen on 4711 socket instead of expecting stdin/out for communication with VSCode extension)
  3. Start debugging mobile-debug.exe
  4. Open vscode-comet in VSCode and debug the Extension launch profile which already exists in launch.json. This will open a new instance of VSCode with the Comet extension loaded (being debugged by the first VSCode instance).
  5. Load a valid project (ie: dotnet new maui) in the second instance of VSCode
  6. Follow the steps in the section above (Debugging a .NET Mobile app with the Extension) to setup a launch.json for the project.
  7. Before you start debugging, add the following setting to your launch.json: "debugServer": 4711, (this tells VSCode to connect to the 4711 socket which your mobile-debug.exe process is listening on now, as opposed to launching mobile-debug.exe directly itself and using stdio).
  8. Start debugging your app from the second VSCode instance.
  9. You should be able to hit breakpoints and see the VSCode instance connect to the mobile-debug.exe running process which you are debugging from Visual Studio.

vscode-comet's People

Contributors

angrieco avatar autonomiccoder avatar bretjohnson avatar chrisdias avatar cl3m avatar clancey avatar dependabot[bot] avatar filipw avatar ghostbird avatar harry-cpp avatar hez2010 avatar isidorn avatar jessejiang0214 avatar jonathanpeppers avatar joshspicer avatar lukaszunity avatar lyalindotcom avatar maxbrister avatar mcumming avatar redth avatar t-h-e avatar weinand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vscode-comet's Issues

option to sign apple builds with entitlements.plist

I've been using this cool extension for just maui development and wonder if there's a way to sign and debug builds on apple devices? I'm trying to use Essentials.SecureStorage but need to sign with an entitlements.plist file or the app will crash.

[Question] Mono sdb cannot connect from physical iPhone

Hello. Thank you for your extension! I noticed that the debug does not work from a physical iOS device. I understand that the "start debugger: sdb" command is not sent to iPhone (most likely it stopped at this.wifiListener.BeginAccept )

image

I tried to use mlaunch --tcp-tunnel=XXXX:XXXX --devname=XXXX. Seems like forwarding created but debug still does not work.

Then I tried to see what was going on in dotnet via binlog but I find only install and start app.
image

I install and run app the same way dotnet does, but no magic happens=)
It seems to me that I need to use the command --tcp-tunnel, but I do not know how to do it

Unable to select iOS device for debugging

When I click to load the list of iOS Devices I get the following error

Running the contributed command: 'dotnetmobile.selectDevice' failed.

Steps to reproduce

  • Open MAUI project. I created a new project with .NET6 preview 7
  • picked net6-ios project
  • clicked select device

Screenshot below of the error

image

Unable to select android devices.

Error shown is vs code: Cannot read properties of undefined (reading 'map')

$ dotnet ./mobile-debug.dll util -c=devices -t=android returns
{"id":"db0acfbb-edf2-4f04-896a-03690122eb78","command":"devices","error":"Object reference not set to an instance of an object."}

`execa is not a function` when picking device

It seems there is a problem when importing execa, I tried modify extension.js to import execa properly
before:
const execa = __webpack_require__(/*! execa */ "./node_modules/execa/index.js");
to:
const execa = __webpack_require__(/*! execa */ "./node_modules/execa/index.js").execa;

added .execa at the end for workaround

I use v0.7.0 and on mac

Debug Blazor Code

Hey, I was trying to use comet to debug a blazor hybrid app (mui) but it looks like breakpoints in the blazor code are just being ignored. Is there a way to fix that or is it just not supported?

Work with recent C# extension version

The C# VSCode extension no longer uses Omnisharp. Currently there's a flag to reenable Omnisharp, but I don't expect that to last, and it's stated to not work at all if you're using the C# Dev Kit . Are there any plans to update this extension to keep working in the future?

Disable output window on VSCode launch

Everytime you open a new VSCode instance, an output window opens up in the startup load. This behaviour only occurs after installing Comet extension. Any way to prevent it? I've been trying different commands in settings.json and none of them worked.

image

Debugger cannot work with latest MAUI workload

I updated the maui workload and find the debugger cannot work here's the workload version

Installed Workload Id      Manifest Version      Installation Source
--------------------------------------------------------------------
wasm-tools                 7.0.3/7.0.100         SDK 7.0.100        
maui-tizen                 7.0.59/7.0.100        SDK 7.0.100        
maui-maccatalyst           7.0.59/7.0.100        SDK 7.0.100        
maui-ios                   7.0.59/7.0.100        SDK 7.0.100        
maui-android               7.0.59/7.0.100        SDK 7.0.100  

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.