Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7085515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:26:02+00:00 2026-05-28T07:26:02+00:00

Considering this code: std::vector<myObject*> veryLargeArray; for (int i = 0; i < veryLargeArray.size(); ++i)

  • 0

Considering this code:

std::vector<myObject*> veryLargeArray;

for (int i = 0; i < veryLargeArray.size(); ++i)
{
  param_type* currParams = veryLargeArray[i]->GetParams<param_type>();
  currParams->phi = /* some complex formula */;
}

How would I step that code such that I know what answer is being stored in phi before another iteration of the loop starts which will effectively destroy currParams and with it my chances of watching its values in the debugger?

I am running into this situation all too often and my solution is to either recompile the code by putting a dummy variable just before the end of the block where I then put the break OR go through the array of values, which sometimes may be huge, just so that I can see what value was stored or may require extra work just to convert the stored param_type into the correct object. Both solutions are not ideal as the first introduces warnings (which is treated as an error, in which case I have to set per file rules) as well as recompilation of the code, both of which I would like to avoid, while the second wastes time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:26:03+00:00Added an answer on May 28, 2026 at 7:26 am

    You could have a tracepoint output the value of phi on each iteration through the loop. You should even be able to combine this with breakpoint conditions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Considering this code, VC9 doesn't detect aliasing : typedef struct { int x, y;
Considering this code, can I be absolutely sure that the finally block always executes,
I apologize if this code looks a bit like a mess (considering the length);
I have this small code library that I'm considering releasing into Open Source. I
I'm trying to compile this code with GCC 4.5.0: #include <algorithm> #include <vector> template
what do you guys think of this code to help with some lazy people
I am trying to compile this code: class OthelloState { public: // constructor Othello(int
considering this code Dim cn As New ADODB.Connection, cn2 As New ADODB.Connection Dim rs
Considering this code fragment: struct My { operator const char*()const{ return my; } }
Considering this sample code: <div style=width:300px;> <a href=#> <img src=images/bracket_open.png/> <img src=images/1.png/> <img src=images/bracket_close.png/>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.