Skip to content

Commit

Permalink
auto add breakpoint for new installs; bugfix when reloading files
Browse files Browse the repository at this point in the history
  • Loading branch information
Chad Smith committed May 9, 2017
1 parent eaa8139 commit bf94170
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A browser-based frontend/gui for GDB
.. image:: https://travis-ci.org/cs01/gdbgui.svg?branch=master
:target: https://travis-ci.org/cs01/gdbgui

.. image:: https://img.shields.io/badge/pyPI-0.7.6.1-blue.svg
.. image:: https://img.shields.io/badge/pyPI-0.7.6.2-blue.svg
:target: https://pypi.python.org/pypi/gdbgui/

.. image:: https://img.shields.io/badge/python-2.7,3.4,3.5,3.6,pypy-blue.svg
Expand Down
2 changes: 1 addition & 1 deletion gdbgui/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.6.1
0.7.6.2
2 changes: 1 addition & 1 deletion gdbgui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__title__ = 'gdbgui'
__version__ = '0.7.6.1'
__version__ = '0.7.6.2'
__author__ = 'Chad Smith'
__copyright__ = 'Copyright Chad Smith'
10 changes: 7 additions & 3 deletions gdbgui/static/js/gdbgui.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,14 @@ let State = {
window.addEventListener('event_inferior_program_paused', State.event_inferior_program_paused)
window.addEventListener('event_select_frame', State.event_select_frame)

// make sure saved preferences are valid
if(localStorage.getItem('highlight_source_code') === null || !_.isBoolean(JSON.parse(localStorage.getItem('highlight_source_code')))){
// make sure saved preferences are set/valid
if(localStorage.getItem('highlight_source_code') === null){
localStorage.setItem('highlight_source_code', JSON.stringify(true))
State.set('highlight_source_code', true)
}
if(localStorage.getItem('auto_add_breakpoint_to_main') === null || !_.isBoolean(JSON.parse(localStorage.getItem('auto_add_breakpoint_to_main')))){
if(localStorage.getItem('auto_add_breakpoint_to_main') === null){
localStorage.setItem('auto_add_breakpoint_to_main', JSON.stringify(true))
State.set('auto_add_breakpoint_to_main', true)
}
},
/**
Expand Down Expand Up @@ -1038,6 +1040,7 @@ const SourceCode = {
SourceCode.render()
},
clear_cached_source_files: function(){
State.set('rendered_source_file_fullname', null)
State.set('cached_source_files', [])
},
/**
Expand Down Expand Up @@ -1123,6 +1126,7 @@ const SourceCode = {
if(State.get('fullname_to_render') === null){
return
}else if(!SourceCode.is_cached(State.get('fullname_to_render'))){
SourceCode.el.html('')
SourceCode.fetch_file(State.get('fullname_to_render'))
return
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def run(self):

setup(
name='gdbgui',
version='0.7.6.1',
version='0.7.6.2',
author='Chad Smith',
author_email='[email protected]',
description=('browser-based gdb frontend using Flask and JavaScript to visually debug C, C++, Go, or Rust'),
Expand Down

0 comments on commit bf94170

Please sign in to comment.