C
C#16mo ago
Tyler

❔ New to C#, trying to create a gui that lets me start/stop my discord bot on a remote linux machine

I am new to c#, but trying to learn. I have a simple gui with a start and stop button at the moment. I believe I have ssh setup in the cs files, but when I click the buttons, nothing happens and I am really not sure where to go to see any errors or output.
16 Replies
Tyler
TylerOP16mo ago
this is the basic gui This code link is for my file MainForm.cs https://mystb.in/InexpensiveThumbsBased This code link is for my SSHManager.cs https://mystb.in/DetailedCareyLoading Any help in understanding what I am doing wrong is much appreciated. Once I get it working, I will work on making it look better. Ideally, pressing the start button runs this command on the remote linux machine sudo systemctl start bub.service and pressing the stop button runs this command sudo systemctl stop bub.service $code
MODiX
MODiX16mo ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
Pobiega
Pobiega16mo ago
Have you tried debugging it?
Tyler
TylerOP16mo ago
im gonna be honest, I am new to visual studio debugging, so im not sure what im looking at, but the codes not giving me any errors, just a couple warnings
Pobiega
Pobiega16mo ago
you need to verify that sending a command actually works, so perhaps make it send touch test etc if you had errors, you wouldnt be able to build/run
Tyler
TylerOP16mo ago
Pobiega
Pobiega16mo ago
debugging is stepping through the program line by line to see if it does waht you want $debug
MODiX
MODiX16mo ago
Tutorial: Debug C# code - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
Pobiega
Pobiega16mo ago
read this, give it a try I need to do something, I'll be back in ~20 min if you havent figured it out by then, we can screenshare and try
Tyler
TylerOP16mo ago
ok! yeah im still lost sadly
Pobiega
Pobiega16mo ago
Alright, I'm back
Tyler
TylerOP16mo ago
so I walked through setting break points, but im not sure what im looking for to be honest
Pobiega
Pobiega16mo ago
Alright #dev-vc-1 You comming?
Tyler
TylerOP16mo ago
$vps
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server