Results 1 to 6 of 6

Thread: [RESOLVED] Why is my debug opening C# files?

  1. #1

    Thread Starter
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Resolved [RESOLVED] Why is my debug opening C# files?

    Ok hard to explain this one, it may be the codeproject addin i added recently or its a setting i have changed somewhere but when i'm debugging my app opens up many .cs files, kind of interesting but when i want to step through my code it goes into these files and when it errors it has no reference to where the error actually is. sometimes these files being opened have errors on them which i have had to correct for the code to work.

    Has anyone seen this before and what could i do to stop it, i wish to confirm that it is this addon before i remove it (which i will do if it is this addon causing this).
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  2. #2
    Fanatic Member stlaural's Avatar
    Join Date
    Sep 2007
    Location
    Quebec, Canada
    Posts
    683

    Re: Why is my debug opening C# files?

    Could it simply be that the addon you added has been coded in CSharp and that when you debug it goes through its code ?

    Can you tell us which CodeProject addon you are using ?
    Alex
    .NET developer
    "No. Not even in the face of Armageddon. Never compromise." (Walter Kovacs/Rorschach)

    Things to consider before posting.
    Don't forget to rate the posts if they helped and mark thread as resolved when they are.


    .Net Regex Syntax (Scripting) | .Net Regex Language Element | .Net Regex Class | DateTime format | Framework 4.0: what's new
    My fresh new blog : writingthecode, even if I don't post much.

    System: Intel i7 920, Kingston SSDNow V100 64gig, HDD WD Caviar Black 1TB, External WD "My Book" 500GB, XFX Radeon 4890 XT 1GB, 12 GBs Tri-Channel RAM, 1x27" and 1x23" LCDs, Windows 10 x64, ]VS2015, Framework 3.5 and 4.0

  3. #3

  4. #4

    Thread Starter
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Why is my debug opening C# files?

    sure its called codeproject browser, it is meant to link to codeproject files and they can be downloaded direct into the ide. I guess that it isn't this as it happens. what's happening is if i run code and it generates a runtime error it will open a file thats autogenerated in read only mode and in C#. if i try to step through a project it can load 10 of these files each seems linked to an assembly.

    The following code opens the following files if i press F8 to move through the program


    Code:
    Public Class Form1
        Dim mouseFlag As Boolean = False
        Private Const WM_NCHITTEST As Integer = &H84
        Private Const HTCLIENT As Integer = &H1
        Private Const HTCAPTION As Integer = &H2
        Dim rgnMain, rgnClose As Region
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim gp1, gp2, gpClose As New Drawing2D.GraphicsPath
            Dim rect As New Rectangle(0, 0, Me.Width, Me.Height)
            Dim rect2 As New Rectangle
            rect2.X = CInt(Me.Width / 4)
            rect2.Y = CInt(Me.Height / 4)
            rect2.Width = CInt(Me.Width / 2)
            rect2.Height = CInt(Me.Height / 2)
            Dim rectClose As New Rectangle(2, 2, 32, 32)
            gp1.AddEllipse(rect)
            gp1.AddEllipse(rect2)
            gp2.AddPie(rect2, 20, 50)
            rgnMain = New Region(gp1)
            rgnMain.Union(gp2)
            gpClose.AddEllipse(rectClose)
            rgnMain.Union(gpClose)
            rgnClose = New Region(gpClose)
            Me.Region = rgnClose
            Me.Region = rgnMain
            Dim pt As Point = Me.PointToClient(Windows.Forms.Cursor.Position)
            'If rgnClose.IsVisible(pt) Then
            'Me.Close()
            'End If
        End Sub
    
        Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
            Dim pt As Point = Me.PointToClient(Windows.Forms.Cursor.Position)
            Select m.Msg
                Case WM_NCHITTEST
                    MyBase.WndProc(m)
                    If (m.Result.ToInt32 = HTCLIENT) Then
                        m.Result = IntPtr.op_Explicit(HTCAPTION)
                    End If
                    Exit Sub
            End Select
            MyBase.WndProc(m)
            If Me.WindowState = FormWindowState.Maximized Then Me.WindowState = FormWindowState.Normal
        End Sub
    End Class
    Control.cs
    PropertyStore.cs
    FlowControl.cs
    WindowsFormsApplicationBase.cs
    ScrollableControls.cs
    ContainerControls.cs
    Form.cs
    Message.cs
    NativeWindow.cs
    UnsafeNativeMethods.cs
    Gdiplus.cs
    Graphics.cs
    HandleCollector.cs
    Region.cs
    Rectangle.cs
    GraphicsPath.cs

    these are opened in reverse order btw.
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  5. #5

    Thread Starter
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Why is my debug opening C# files?

    Quote Originally Posted by NickThissen View Post
    I had the same thing happen to me mere days ago:
    http://www.vbforums.com/showthread.php?t=607226

    I needed to check the 'Enable Just My Code' option in the Debugging section.
    now that sounds familiar, something came up in a code analysis so i changed that I kind of like the idea you can get into the nuts and bolts of the ide but while debugging simple code it is a pita will change that setting now.
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  6. #6

    Thread Starter
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Why is my debug opening C# files?

    yep sure enough thats the one thanks again, now i can debug as nature intended lol
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width