lava
lava

Reputation: 7451

Flutter-desktop windows plugin debug native c++ code

I would like to create a Flutter desktop windows plugin.I want to debug the native c++ code . Is there any documentation or any article.Debugging native c++ code in Flutter Desktop app / plugin.Already asked here but any solution mentioned or answer.i could debug dart code only using android studio .Any solution accepted.

What i did?

This command i used to create windows plugin

flutter create --org com.example --template=plugin --platforms=windows hellp

Here i use android studio ide to manage my dart code .my flutter version 2.10.i already installed visualstudio 2022 with windows desktop developement kit already mention in flutter document.

enter image description here

Upvotes: 2

Views: 1629

Answers (1)

lava
lava

Reputation: 7451

This is the command used to create sample plugin

flutter create --org com.example --template=plugin --platforms=windows hellp

Same step used for Visual-studio-code

enter image description here

  1. Windows(project root folder) ==> Copy Path ==> your project path

enter image description here

  1. Copy path enter image description here

  2. File =>Open=>Folder

enter image description here 4. Select your flutter project windows folder

enter image description here 5. Debug your application in android studio enter image description here

  1. (Visual studio) Debug=>Attach process

enter image description here 7. (Visual studio) Debug=>Attach process

enter image description here 8. Debug your application again in android studio enter image description here 9. now you can see it will hit on the visualstudio breakpoint

First Gif

enter image description here

Second Gif

enter image description here

Upvotes: 2

Related Questions