Need help with debugging my project

hopefully, answers to why my project won't debug

Page 1 of 1

6 Replies - 3898 Views - Last Post: 10 February 2010 - 06:43 PM Rate Topic: -----

#1 kweef19  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 108
  • Joined: 19-January 10

Need help with debugging my project

Posted 10 February 2010 - 04:39 PM

I'm using visual studio express 2008, I wrote my code for a project and then when I tried to debug it I got a few errors but one main one that says this...
Visual Studio cannot start debugging because the debug target "".exe is missing Please build the project and retry, or set the output path and assembly names appropriately to point at the correct location of the target assembly


Since this is my first time debugging a program with this particular instance of the program, I am in shock. Does anyone know how to fix this issue???

Is This A Good Question/Topic? 0
  • +

Replies To: Need help with debugging my project

#2 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1623
  • View blog
  • Posts: 5,199
  • Joined: 25-September 09

Re: Need help with debugging my project

Posted 10 February 2010 - 04:51 PM

Sounds like you have Errors in your code that the compiler can't process therefore, nothing has been built. In the view menu, select Error List and see what errors your code has.

This post has been edited by CharlieMay: 10 February 2010 - 04:52 PM

Was This Post Helpful? 0
  • +
  • -

#3 kweef19  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 108
  • Joined: 19-January 10

Re: Need help with debugging my project

Posted 10 February 2010 - 05:33 PM

Here are the errors I'm getting...
Error	1	Operator '+' is not defined for types 'Integer' and 'System.Windows.Forms.TextBox'.	C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2008\Projects\Piecework\Piecework\Form1.vb	36	38	Piecework

Error	2	'TotalDollarsEarnedTxtbox' is already declared as 'Friend WithEvents TotalDollarsEarnedTxtbox As System.Windows.Forms.TextBox' in this class.	C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2008\Projects\Piecework\Piecework\Form1.vb	65	9	Piecework

Error	3	'Clear' is not a member of 'Decimal'.	C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2008\Projects\Piecework\Piecework\Form1.vb	69	9	Piecework


Well there they are...I'm totally baffled. I hope someone can help me understand what is keeping my program from debugging.
Was This Post Helpful? 0
  • +
  • -

#4 kweef19  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 108
  • Joined: 19-January 10

Re: Need help with debugging my project

Posted 10 February 2010 - 05:39 PM

Also, in case it may help, here is the code I have written for my program...
Public Class Form1

    Private Sub SummaryBut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SummaryBut.Click
        Dim PiecesProdTxtbox As Double

        Dim TotalPayTxtbox As Integer

        Dim PiecesCostTxtbox As Integer

        Dim AveragePayPerPersonTxtbox As Decimal

        Dim MsgCenterTxtbox As String


        'this is a simple case select procedure to determine 
        'the cost of each piece.
        Select Case PiecesProdTxtbox
            Case CDbl(("PiecesProdTxtbox <= 199"))
                PiecesCostTxtbox = CInt(".50")
            Case CDbl(("PiecesProdTxtbox <= 399"))
                PiecesCostTxtbox = CInt(".55")
            Case CDbl(("PiecesProdTxtbox <= 599"))
                PiecesCostTxtbox = CInt(".60")
            Case CDbl(("PiecesProdTxtbox >= 600"))
                PiecesCostTxtbox = CInt(".65")
            Case Else
                MsgCenterTxtbox = "Invalid Input"
        End Select
        'this next line is to multiply the piece cost times the 
        'pieces produced resulting in the total Pay for said pieceworker
        TotalPayTxtbox = CInt((PiecesProdTxtbox * PiecesCostTxtbox) / PiecesProdTxtbox)


        'this line of code divides Total Pay by Total number of pieces 
        'to get Average pay per pieceworker.
        AveragePayPerPersonTxtbox = (TotalPayTxtbox) + (TotalDollarsEarnedTxtbox) / 2



    End Sub

    Private Sub CalcBut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalcBut.Click
        Dim PiecesCostTxtbox As Integer
        Dim PiecesProdTxtbox As Integer
        Dim MsgCenterTxtbox As String
        Dim TotalDollarsEarnedTxtbox As Decimal

        Select Case PiecesProdTxtbox
            Case CInt(PiecesProdTxtbox <= 199)
                PiecesCostTxtbox = CInt(".50")
            Case CInt(PiecesProdTxtbox <= 399)
                PiecesCostTxtbox = CInt(".55")
            Case CInt(PiecesProdTxtbox <= 599)
                PiecesCostTxtbox = CInt(".60")
            Case CInt(PiecesProdTxtbox >= 600)
                PiecesCostTxtbox = CInt(".65")
            Case Else
                MsgCenterTxtbox = "Invalid Input"
        End Select

        TotalDollarsEarnedTxtbox = PiecesProdTxtbox * PiecesProdTxtbox

    End Sub

    Dim TotalDollarsEarnedTxtbox As Decimal
    Private Sub ClearBut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearBut.Click
        Dim TotalDollarsEarnedTxtbox As Decimal

        TotalDollarsEarnedTxtbox.Clear()
        NameTxtbox.Clear()
        PiecesProdTxtbox.Clear()
    End Sub

    Private Sub ClearAllBut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearAllBut.Click
        PiecesCostTxtbox.Clear()
        TotalPayTxtbox.Clear()
        AvgPayPerPersonTxtbox.Clear()


    End Sub
End Class





I hope that helps clear up some confusion.
Was This Post Helpful? 0
  • +
  • -

#5 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1623
  • View blog
  • Posts: 5,199
  • Joined: 25-September 09

Re: Need help with debugging my project

Posted 10 February 2010 - 05:58 PM

It appears you have Controls (TextBoxes) named the same as Variables you are declaring.

It get the feeling you are trying to use textboxes .text properties as values like, integers and decimals. This is possible but you don't declare them as such with the same name, instead you would use something like

cint(textbox1.text) or integer.tryparse(textbox1.text) either way, you are leaving off the .text part

Hopefully, I'm not completely out in left field here but this is what you appear to be doing with the code I see.

This post has been edited by CharlieMay: 10 February 2010 - 06:06 PM

Was This Post Helpful? 0
  • +
  • -

#6 kweef19  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 108
  • Joined: 19-January 10

Re: Need help with debugging my project

Posted 10 February 2010 - 06:13 PM

Okay well if I'm understanding you correctly then your exactly right, I am naming my controls and variables with the same names, such as TotalPayLbl(label for total pay) and then I would name the text box TotalPayTxtbox. I honestly thought I was correct in doing this. I guess its back to the ole drawing board. How would you label them if it was your project???
Was This Post Helpful? 0
  • +
  • -

#7 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1623
  • View blog
  • Posts: 5,199
  • Joined: 25-September 09

Re: Need help with debugging my project

Posted 10 February 2010 - 06:43 PM

You can name different controls like that

For example you can have TotalPayLabel and TotalPayTextbox but once you do that you don't want to then Dim TotalPayTextBox as integer

If you have a textbox and you want to calculate what the user types in you would just use something like Total = 1000 + cint(TotalPayTextBox.Text)

NOTICE the .Text it is what is holding the User's input for you to use.

I don't see this in your code where I THINK you are using values from User Input.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1