Author Topic: Content in the immediate window of VB  (Read 3001 times)

StefanA

  • Newbie
  • *
  • Posts: 33
    • View Profile
Content in the immediate window of VB
« on: March 31, 2016, 01:27:18 PM »
When running my AHMI project in debugging mode I get a lot of "alerts" in the immediate window of VB. What are they really about.  The project seems to work fine anyways.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Content in the immediate window of VB
« Reply #1 on: March 31, 2016, 01:52:16 PM »
That's really not normal. What version are you using and which driver?

StefanA

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Content in the immediate window of VB
« Reply #2 on: April 01, 2016, 12:48:06 AM »
oh, I'm using the modbus tcp driver and version 3.99d but this happens with other version too. Haven't though much about it since the project seems to work and no errors are present when building the project.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Content in the immediate window of VB
« Reply #3 on: April 01, 2016, 01:26:56 AM »
My first guess was intermittent communications, but it looks like there is a pattern to the messages. This leads me to believe the device doesn't like a certain address or is sending less data back than expected.

If you go to Debug->Windows->Exception Settings , then check the box for Common Language Runtime Exceptions, it will stop the code at where the exception is occurring. If you do that, let me know what line of code is stops at, then I can go a little deeper into the problem.

StefanA

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Content in the immediate window of VB
« Reply #4 on: April 01, 2016, 02:15:03 PM »
I only have 2 option under debug -> window: Output and Immediat. Can find Exception Settings. I'm using visual basic express 2010 and the device communicating with AHMI is a arduino board running the Mudbus library.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Content in the immediate window of VB
« Reply #5 on: April 01, 2016, 05:15:32 PM »
In that case go to Debug->Exceptions and check the Thrown column for Common Language Runtime Exceptions

StefanA

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Content in the immediate window of VB
« Reply #6 on: April 02, 2016, 05:09:11 AM »
hm, Now I feel stupid but I can't find that setting either. Can it have something to with deleted objects on the mainform? Have seen that even if the object is deleted from the form the VB code is still present?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Content in the immediate window of VB
« Reply #7 on: April 02, 2016, 08:03:41 AM »
I think the problem is the Express version of VS. The Express versions were stripped of a lot of features and that must be one of them. Do you have enough hard drive space and higher than XP so you can install Visual Studio 2015 Community?

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Content in the immediate window of VB
« Reply #8 on: April 02, 2016, 09:01:30 AM »
It shows in the VS2010 Express version that I'm using.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Content in the immediate window of VB
« Reply #9 on: April 02, 2016, 09:06:19 AM »
I think I found out why it's not in the menus. There are different settings that give different menu options. See here:

https://msdn.microsoft.com/en-us/library/ff966438.aspx

StefanA

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Content in the immediate window of VB
« Reply #10 on: April 03, 2016, 09:33:03 AM »
I managed to enable the exceptions function in VB Express 2010 with the help of the link you provided and some google searches  but I also decided to upgrade to VS community. So from here, I should check the box, Common Language Runtime Exceptions in the menu Debug->Windows->Exception Settings and then?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Content in the immediate window of VB
« Reply #11 on: April 03, 2016, 08:14:30 PM »
After checking the Common Language Runtime box, run the application. It will now stop at the point in the code where the exception occurs. Post the details on that.

StefanA

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Content in the immediate window of VB
« Reply #12 on: April 13, 2016, 02:11:03 PM »
The code have not stopped executing after I enabled the Common Language Runtime Exception. I attached a text file with the content of the output window after  running debug mode for a while.